/kind-cluster

Create local Kubernetes clusters using Docker container "nodes" using kind

Primary LanguageShellMIT LicenseMIT

End to End Tests Hits License: MIT

kind-cluster

Create local Kubernetes clusters using Docker container "nodes" with kind

Requirements

Install all (kind k8s cluster, Nginx ingress, MetaLB, demo workloads)

./scripts/kind-install-all.sh

Or you can install each component individually

Create k8s cluster

./scripts/kind-create.sh

Export k8s keys(client) and certificates(client, cluster CA)

./scripts/kind-create.sh

Script creates:

  • client.key
  • client.crt
  • client.pfx
  • cluster-ca.crt

Install k8s dashboard

Install k8s dashboard

./scripts/kind-add-dashboard.sh

Script creates file with admin-user token

  • dashboard-admin-token.txt

Launch k8s Dashboard

In terminal

# kill kubectl proxy if already running
pkill -9 -f "kubectl proxy"
# start new kubectl proxy
kubectl proxy –address=’0.0.0.0′ –accept-hosts=’^*$’ &
# copy admin-user token to the clipboard
cat ./dashboard-admin-token.txt | xclip -i
# open dashboard
xdg-open "http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/" &

In Dashboard UI select "Token' and Ctrl+V

Install Nginx ingress

./scripts/kind-add-ingress-nginx.sh

Install MetalLB load balancer

./scripts/kind-add-metallb.sh

Deploy demo workloads

Deploy httpd web server and create an ingress rule for a localhost http://demo.localdev.me:80/

./scripts/kind-deploy-app-nginx-ingress-localhost.sh

Deploy helloweb

./scripts/kind-deploy-app-helloweb.sh

Deploy golang-hello-world-web

./scripts/kind-deploy-app-golang-hello-world-web.sh

Deploy foo-bar-service

./scripts/kind-deploy-app-foo-bar-service.sh

Delete k8s cluster

./scripts/kind-delete.sh