alwaysvova.blogg.se

Download master debian
Download master debian











  1. #DOWNLOAD MASTER DEBIAN INSTALL#
  2. #DOWNLOAD MASTER DEBIAN UPDATE#

Note : In the curl command we can use either of worker node’s hostname. Try to access the nginx based application using following curl commandalong with the nodeport 30036. $ kubectl expose deployment nginx-app -name=nginx-web-svc -type NodePort -port 80 -target-port 80 Run beneath commands, $ kubectl create deployment nginx-app -image=nginx -replicas 2 To test Kubernetes cluster installation, let’s try to deploy nginx based application via deployment. Now, this cluster is ready for the workload. Great, output above confirms that master and worker nodes are in ready status. Verify the status of Calico pods, run $ kubectl get pods -n kube-system

#DOWNLOAD MASTER DEBIAN INSTALL#

On the master node, run beneath command to install calico, $ kubectl apply -f Īllow Calico ports in OS firewall, run beneath ufw commands on all the nodes, $ sudo ufw allow 179/tcp To make nodes status ready, we must install POD network addons like Calico or flannel. K8s-master NotReady control-plane 23m v1.25.0 discovery-token-ca-cert-hash sha256:2be58f54458d0e788c96b8841f811069019161f9a3dd8502a38c773e5c6ead17Ĭheck the nodes status by running following command from master node, $ kubectl get nodes In my case, following is the command $ sudo kubeadm join k8s-master:6443 -token ta622t.enl212euq7z87mgj \ Note: Copy the exact command from the output of ‘kubeadm init’ command. Join both the worker nodes to the cluster by running ‘Kubeadm join’ command. Run following kubectl command to get nodes and cluster information, $ kubectl get nodes $ sudo chown $(id -u):$(id -g) $HOME/.kube/config $ sudo cp -i /etc/kubernetes/nf $HOME/.kube/config To start interacting with cluster, run following commands on master node, $ mkdir -p $HOME/.kube In the output, we have commands for regular user for interacting with the cluster and also the command to join any worker node to this cluster. Now, we are all set to create Kubernetes cluster, run following command only from master node, $ sudo kubeadm init -control-plane-endpoint=k8s-masterĪbove output confirms that control plane has been initialized successfully. $ sudo apt-mark hold kubelet kubeadm kubectl 7) Create Kubernetes Cluster with Kubeadm $ sudo apt install kubelet kubeadm kubectl -y Run the following apt commands on all the nodes to install Kubernetes cluster components like kubelet, kubectl and Kubeadm. $ sudo apt-add-repository "deb kubernetes-xenial main" 6) Install Kubelet, Kubectl and Kubeadm on all nodes $ curl -s | sudo gpg -dearmour -o /etc/apt//cgoogle.gpg $ sudo systemctl enable containerd 5) Enable Kubernetes Apt RepositoryĮnable Kubernetes apt repository on all the nodes, run $ sudo apt install gnupg gnupg2 curl software-properties-common -y Restart and enable containerd service on all the nodes, $ sudo systemctl restart containerd Set cgroupdriver to systemd on all the nodes,Įdit the file ‘ /etc/containerd/config.toml’ and look for the section ‘ ’ and add SystemdCgroup = true $ sudo vi /etc/containerd/config.toml 4) Install Containerd run time on all nodesĬontainerd is the industry standard container run time, we must install containerd on all master and worker nodes.īefore installing containerd, set the following kernel parameters on all the nodes. Note: If firewall is disabled on your Debian 11 systems, then you can skip this step. On Worker Nodes, $ sudo ufw allow 10250/tcp On Master node, run $ sudo ufw allow 6443/tcp

download master debian

In case, OS firewall is enabled on your debian systems then allow following ports on master and worker nodes respectively. $ sudo sed -i '/ swap / s/^\(.*\)$/#\1/g' /etc/fstab 3) Configure Firewall Rules for Kubernetes Cluster Run following commands on master and worker nodes to turn off swap. $ sudo hostnamectl set-hostname "k8s-worker2" // Run on 2nd worker nodeĪdd the following entries in /etc/hosts file on all the nodes, 192.168.1.236 k8s-masterġ92.168.1.238 k8s-worker2 2) Disable Swap on all nodesįor kubelet to work smoothly, it is recommended to disable swap. $ sudo hostnamectl set-hostname "k8s-worker1" // Run on 1st worker node $ sudo hostnamectl set-hostname "k8s-master" // Run on master node Use hostnamectl command to set the hostnameon master and worker nodes.

#DOWNLOAD MASTER DEBIAN UPDATE#

1 ) Set Host Name and update /etc/hosts file Without any further delay, let’s jump into the installation steps. For the demonstration, I am using three Debian 11 systems with following details,













Download master debian