railiorew.blogg.se

Install kubernetes cluster ubuntu
Install kubernetes cluster ubuntu





install kubernetes cluster ubuntu

install kubernetes cluster ubuntu

This command will be in the following format:kubeadm join -token : -discovery-token-ca-cert-hash sha256. The first play gets the join command that needs to be run on the worker nodes. To check the status of the master node, SSH into it with the following command: Master : ok=5 changed=4 unreachable=0 failed=0 The kube-flannel.yml file contains the descriptions of objects required for setting up Flannel in the cluster.Īnsible-playbook -i hosts ~/kube-cluster/master.yml is the syntax for telling kubectl to create the objects described in the descriptor.

#INSTALL KUBERNETES CLUSTER UBUNTU INSTALL#

The last task runs kubectl apply to install Flannel. Shell: kubectl apply -f > pod_network_setup_complete.txt Shell: kubeadm init -pod-network-cidr=10.244.0.0/16 > cluster_initialized.txt For this cluster, you will use Flannel, a stable and performant option.Ĭreate an Ansible playbook named master.yml on your local machine:Īdd the following play to the file to initialize the cluster and install Flannel: This functionality is provided by pod network plugins. Worker2 : ok=7 changed=5 unreachable=0 failed=0 Worker1 : ok=7 changed=5 unreachable=0 failed=0

install kubernetes cluster ubuntu

Master : ok=9 changed=5 unreachable=0 failed=0 On completion, you will see output similar to the following: Next, execute the playbook by locally running:Īnsible-playbook -i hosts ~/kube-cluster/kube-dependencies.yml Save and close the file when you are finished. The second play consists of a single task that installs kubectl on your master node. Installs apt-transport-https, allowing you to add external HTTPS sources to your APT sources list.Īdds the Kubernetes APT repository's apt-key for key verification.Īdds the Kubernetes APT repository to your remote servers' APT sources list. The first play in the playbook does the following: Nano ~/kube-cluster/kube-dependencies.ymlĪdd the following plays to the file to install these packages to your servers: Kubectl - a CLI tool used for issuing commands to the cluster through its API Server.Ĭreate a file named ~/kube-cluster/kube-dependencies.yml in the workspace:







Install kubernetes cluster ubuntu