visit
kind is a tool for running local Kubernetes clusters using Docker container "nodes". kind is primarily designed for testing Kubernetes 1.11+, initially targeting the conformance tests.
As it is built using go, you will need to make sure you have the latest version of
golang
installed on your machine.According to the k8s ,
golang -v 1.11.5
is preferred. To install kind, run these commands (it takes a while):go get -u sigs.k8s.io/kind
kind create cluster
kind get clusters
Also, install the latest
kubernetes-cli
using or .kubectl
. Check its version by running this command:kubectl version
Make sure it shows
GitVersion: "v1.14.1"
or above.kubectl
from Docker, try brew link
or reorder path environment variable.Once
kubectl
and kind are ready, open bash console and run these commands:export KUBECONFIG=”$(kind get kubeconfig-path)”
kubectl cluster-info
If
kind
is properly set up, some information will be shown.Once those
yaml
files are prepared, layout them as following:k8s-wp/
kustomization.yaml
mysql-deployment.yaml
wordpress-deployment.yaml
cd k8s-wp
kubectl apply -k ./
kubectl get svc cassandra
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
cassandra ClusterIP None <none> 9042/TCP 45s
About the author - Sudip is a Solution Architect with more than 15 years of working experience, and is the founder of . He likes sharing his knowledge by regularly writing for Hackernoon, , and many more. And while he is not doing that, he must be fishing or playing chess.
Previously posted at .