Skip to content

Commit

Permalink
Merge pull request #18 from kubeslice/uma-kt-patch-2
Browse files Browse the repository at this point in the history
Update the gateway-certs-generator README.md
  • Loading branch information
uma-kt authored Feb 20, 2023
2 parents 6271200 + cc533d4 commit 22d79af
Showing 1 changed file with 61 additions and 58 deletions.
119 changes: 61 additions & 58 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,25 @@ The `gateway-certs-generator` is an opinionated single-file OpenVPN TLS certific

`easy-rsa` is a CLI tool/utility to build and manage a PKI CA. use the CLI tool `easy-rsa`. Using the tool, create a root certificate authority, and request and sign certificates including intermediate CAs and certificate revocation lists (CRL).

## Getting Started
It is strongly recommended to use a released version.
## Get Started
It is strongly recommended that you use a released version.

Please refer to our documentation on:
- [Installing KubeSlice on cloud clusters](https://kubeslice.io/documentation/open-source/0.5.0/getting-started-with-cloud-clusters/installing-kubeslice/installing-the-kubeslice-controller)
- [Installing KubeSlice on kind clusters](https://kubeslice.io/documentation/open-source/0.5.0/tutorials/kind-install-kubeslice-controller)
- [Install KubeSlice on cloud clusters](https://kubeslice.io/documentation/open-source/0.6.0/getting-started-with-cloud-clusters/installing-kubeslice/installing-the-kubeslice-controller)
- [Install KubeSlice on kind clusters](https://kubeslice.io/documentation/open-source/0.6.0/tutorials/kind-install-kubeslice-controller)

## Building and Deploying `gateway-certs-generator` on a Kind Cluster
## Build and Deploy Certificate Generator on a Kind Cluster

To create certificates, the controller needs the `gateway-cert-generator` image. Therefore, we create the image and use the image version in the controller values file.
To generate certificates, the controller requires the 'gateway-cert-generator' image. So, we create the image and use the image version in the controller values file.

### Prerequisites
Before you begin, make sure the following prerequisites are met:
* Docker is installed and running on your local machine.
* A running [`kind`](https://kind.sigs.k8s.io/) cluster.
* [`kubectl`](https://kubernetes.io/docs/tasks/tools/) is installed and configured.
* You have prepared the environment to install [`kubeslice-controller`](https://github.com/kubeslice/kubeslice-controller) on the controller cluster and [`worker-operator`](https://github.com/kubeslice/worker-operator) on the worker cluster. For more information, see [Prerequisites](https://kubeslice.io/documentation/open-source/0.5.0/getting-started-with-cloud-clusters/prerequisites/).
* You have prepared the environment to install [`kubeslice-controller`](https://github.com/kubeslice/kubeslice-controller) on the controller cluster and [`worker-operator`](https://github.com/kubeslice/worker-operator) on the worker cluster. For more information, see [Prerequisites](https://kubeslice.io/documentation/open-source/0.6.0/getting-started-with-cloud-clusters/prerequisites/).

### Setting up Your Helm Repo
### Set up Your Helm Repo
If you have not added avesha helm repo yet, add it.

```console
Expand All @@ -36,79 +36,82 @@ helm repo update
```

### Build Your Docker Image
#### Latest docker image - [gateway-certs-generator](https://hub.docker.com/r/aveshasystems/gateway-certs-generator)

To download the latest docker image for gateway-certs-generator, click [here](https://hub.docker.com/r/aveshasystems/gateway-certs-generator).

1. Clone the latest version of gateway-certs-generator from the `master` branch.

```console
git clone https://github.com/kubeslice/gateway-certs-generator.git
cd gateway-certs-generator
```
```console
git clone https://github.com/kubeslice/gateway-certs-generator.git
cd gateway-certs-generator
```

2. Adjust image name variable `IMG` in the [`Makefile`](Makefile) to change the docker tag to be built.
Default image is set as `IMG ?= aveshasystems/gateway-certs-generator:latest`. Modify this if required.
2. Modiy the image name variable `IMG` in the [`Makefile`](Makefile) to change the docker tag to be built.
The default image is set as `IMG ?= aveshasystems/gateway-certs-generator:latest`. Modify this if required.

```console
make docker-build
```
### Running Local Image on Kind Clusters
```console
make docker-build
```
### Run Local Image on Kind Clusters

1. Loading gateway-certs-generator Image into your kind cluster ([kind](https://kind.sigs.k8s.io/docs/user/quick-start/#loading-an-image-into-your-cluster)).
1. Load the gateway-certs-generator image into your kind cluster ([kind](https://kind.sigs.k8s.io/docs/user/quick-start/#loading-an-image-into-your-cluster)).
If needed, replace `aveshasystems/gateway-certs-generator` with your locally built image name in the previous step.

* Note: If you use a named cluster, you must specify the name of the cluster you wish to load the images into. See [loading an image into your kind cluster](https://kind.sigs.k8s.io/docs/user/quick-start/#loading-an-image-into-your-cluster).
```console
kind load docker-image aveshasystems/gateway-certs-generator --name cluster-name
```
Example
```console
kind load docker-image aveshasystems/kubeslice-controller --name kind
```

2. Check the loaded image in the cluster. Modify node name if required.

* Note: `kind-control-plane` is the name of the Docker container. Modify if needed.
```console
docker exec -it kind-control-plane crictl images
```

### Deploying in a Cluster
1. Create a chart values called `yourvaluesfile.yaml` file. Refer to [values.yaml](https://github.com/kubeslice/charts/blob/master/charts/kubeslice-controller/values.yaml) on how to adjust this and update the `kubeslice-controller` image to the local build image.

```console
kind load docker-image aveshasystems/gateway-certs-generator --name cluster-name
```
Example
```console
kind load docker-image aveshasystems/kubeslice-controller --name kind
```

2. Check the loaded image in the cluster. Modify the node name if required.

* Note: `kind-control-plane` is the name of the Docker container. Modify if needed.

```console
docker exec -it kind-control-plane crictl images
```

### Deploy the Certificate Generator on a Cluster
1. Create the chart values file called `yourvaluesfile.yaml`. Refer to [values.yaml](https://github.com/kubeslice/charts/blob/master/charts/kubeslice-controller/values.yaml) to update the `kubeslice-controller` image to the local build image.

From the sample:

```
kubeslice:
---
---
ovpnJob:
```
kubeslice:
---
---
image: aveshasystems/gateway-certs-generator
tag: 0.1.0
```
ovpnJob:
---
---
image: aveshasystems/gateway-certs-generator
tag: 0.1.0
```

Change it to:

```
kubeslice:
---
---
ovpnJob:
```
kubeslice:
---
---
image: <my-custom-image>
tag: <unique-tag>
````
ovpnJob:
---
---
image: <my-custom-image>
tag: <unique-tag>
```

2. Deploy the updated chart.

```console
make chart-deploy VALUESFILE=yourvaluesfile.yaml
```
```console
make chart-deploy VALUESFILE=yourvaluesfile.yaml
```

### Uninstalling the KubeSlice Controller
For more information, see [uninstalling KubeSlice](https://kubeslice.io/documentation/open-source/0.5.0/getting-started-with-cloud-clusters/uninstalling-kubeslice/offboarding-namespaces).
### Uninstall the KubeSlice Controller
For more information, see [uninstalling KubeSlice](https://kubeslice.io/documentation/open-source/0.6.0/getting-started-with-cloud-clusters/uninstalling-kubeslice/offboarding-namespaces).

```console
make chart-undeploy
Expand Down

0 comments on commit 22d79af

Please sign in to comment.