-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from ns1labs/kind-support
adding kind support for local k8s deployment
- Loading branch information
Showing
6 changed files
with
816 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Kind local cluster | ||
|
||
Kind is a tool for running local k8s clusters using docker container as nodes. | ||
|
||
## 🚧 Install Kind | ||
|
||
if you have `go 1.17` installed | ||
```shell | ||
go install sigs.k8s.io/[email protected] | ||
``` | ||
|
||
macOS | ||
```shell | ||
brew install kind | ||
``` | ||
|
||
> 🚨 **Windows WSL users**: WSL is also supported, but for some reason the Orb stack mess up the WSL internal DNS. | ||
> You can fix that by editing your `/etc/wsl.conf` and adding the following: | ||
> ```shell | ||
> [network] | ||
> generateResolvConf = false | ||
> ``` | ||
> Then remove the symbolic link from `/etc/resolv.conf`: | ||
> ```shell | ||
> sudo unlink /etc/resolv.conf | ||
> ``` | ||
> Create a new `/etc/resolv.conf` file and add the following: | ||
> ```shell | ||
> nameserver 8.8.8.8 | ||
> ``` | ||
> save the file and you are done. | ||
## 🚀 Deploy Orb on Kind | ||
Use the following command to create the cluster and deploy **Orb** | ||
```shell | ||
make kind-create-all | ||
``` | ||
Access the **Orb UI** by accessing: https://kubernetes.docker.internal/. The admin user is created with the following credentials: `[email protected] / pass123456` | ||
|
||
If you want to delete the cluster run: | ||
|
||
```shell | ||
make kind-delete-cluster | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,3 +20,24 @@ index: | |
git push | ||
git checkout main | ||
|
||
kind-create-all: kind-create-cluster kind-install-orb | ||
|
||
kind-create-cluster: | ||
kind create cluster --image kindest/node:v1.23.0 --config=./kind/config.yaml | ||
|
||
kind-delete-cluster: | ||
kind delete cluster | ||
|
||
kind-install-orb: | ||
kubectl create namespace orb | ||
kubectl create secret generic orb-auth-service --from-literal=jwtSecret=MY_SECRET -n orb | ||
kubectl create secret generic orb-user-service [email protected] --from-literal=adminPassword=pass123456 -n orb | ||
helm install --set defaults.replicaCount=1 --set nginx_internal.kindDeploy=true --set ingress.hostname=kubernetes.docker.internal -n orb kind-orb ./charts/orb | ||
kubectl apply -f ./kind/nginx.yaml | ||
|
||
kind-delete-orb: | ||
kubectl delete -f ./kind/nginx.yaml | ||
helm delete -n orb kind-orb | ||
kubectl delete secret generic orb-user-service -n orb | ||
kubectl delete secret generic orb-auth-service -n orb | ||
kubectl delete namespace orb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
kind: Cluster | ||
apiVersion: kind.x-k8s.io/v1alpha4 | ||
nodes: | ||
- role: control-plane | ||
kubeadmConfigPatches: | ||
- | | ||
kind: InitConfiguration | ||
nodeRegistration: | ||
kubeletExtraArgs: | ||
node-labels: "ingress-ready=true" | ||
extraPortMappings: | ||
- containerPort: 80 | ||
hostPort: 80 | ||
protocol: TCP | ||
- containerPort: 443 | ||
hostPort: 443 | ||
protocol: TCP | ||
- containerPort: 8883 | ||
hostPort: 8883 | ||
protocol: TCP |
Oops, something went wrong.