...
Code Block | ||||
---|---|---|---|---|
| ||||
# The following command accepts several arguments, but for building a small test cluster let's run it without them $ kubeadm init <args> . . . # At the end of the procedure, an output similar to this will appear Your Kubernetes control-plane has initialized successfully! To start using your cluster, you need to run the following as a regular user: mkdir -p $HOME/.kube sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config sudo chown $(id -u):$(id -g) $HOME/.kube/config You should now deploy a Pod network to the cluster. Run "kubectl apply -f [podnetwork].yaml" with one of the options listed at: /docs/concepts/cluster-administration/addons/ You can now join any number of machines by running the following on each node as root: kubeadm join <control-plane-host>:<control-plane-port> --token <token> --discovery-token-ca-cert-hash sha256:<hash> |
Info | ||
---|---|---|
| ||
We are now building a simple cluster, consisting of a control-plane with n nodes, so we run the kubeadm init command with no arguments. If you have plans to upgrade this single control-plane |
The output shown above gives us 3 information:
...
Code Block | ||||
---|---|---|---|---|
| ||||
$ kubectl get nodes NAME STATUS ROLES AGE VERSION mycentos-0.novalocal Ready master 30h v1.1920.20 mycentos-1.novalocal Ready <none> 25h v1.1920.20 mycentos-2.novalocal Ready <none> 24h v1.1920.20 |
The output should list the nodes that are part of the cluster.
...