DevOps is not a goal, but a never-ending process of continual improvement. If you automate a mess, you get an automated mess. The most powerful tool we have as developers is automation. My linkedin Ratul
By completing this article we'll learn about Docker orchestration- Kubernetes
Create 2 VMs and set the hostname
kube-master
kube-worker
In Master Node
In Worker Node
Update the hosts file in both nodes
Install Docker in both nodes:
Install Kubernetes in both nodes:
Installing Kubeadm, kubelet and kubectl. You will install these packages on all of your machines:
kubeadm: the command to bootstrap the cluster. kubelet: the component that runs on all of the machines in your cluster and does things like starting pods and containers. kubectl: the command line util to talk to your cluster.
In Master Node
Make sure that the cgroup driver used by kubelet is the same as the one used by Docker. Verify that your Docker cgroup driver matches the kubelet config:
Initialize Cluster
The master is the machine where the control plane components run, including etcd (the cluster database) and the API server (which the kubectl CLI communicates with).
To make kubectl work for your non-root user, you might want to run these commands (which is also a part of the kubeadm init output):
Alternatively, if you are the root user, you could run this:
Now, install a pod network add-on so that your pods can communicate with each other. It is a must…
Install metrics-server
Install heapster
If API Aggregator no enabled then follow this
https://kubernetes.io/docs/tasks/access-kubernetes-api/configure-aggregation-layer/
In Minion Node
Joining Worker
–token: kube-master generated token and –discovery-token-ca-cert-hash: also generated by kube-master, output of (kubeadm init)
If you want to remove all configuration from any node: