From 3daa406b3c22c857c81862bdd1269db45554d185 Mon Sep 17 00:00:00 2001 From: Gorden Date: Fri, 16 Feb 2024 12:51:49 +0100 Subject: [PATCH] debug --- .../Installation Kubernetes-Cluster.md | 41 +++++-------------- 1 file changed, 11 insertions(+), 30 deletions(-) diff --git a/Installation/Installation Kubernetes-Cluster.md b/Installation/Installation Kubernetes-Cluster.md index 8dd589b..05a1fc3 100644 --- a/Installation/Installation Kubernetes-Cluster.md +++ b/Installation/Installation Kubernetes-Cluster.md @@ -148,47 +148,28 @@ To make nodes status ready, we must install POD network addons like Calico or fl ## Setup Pod Network Using Calico On the master node, run beneath command to install calico, - -$ kubectl apply -f https://raw.githubusercontent.com/projectcalico/calico/v3.26.1/manifests/calico.yaml -Output, - -Install-Calico-Pod-Network-Addon-K8s-Debian12 +>$ kubectl apply -f https://raw.githubusercontent.com/projectcalico/calico/v3.26.1/manifests/calico.yaml Allow Calico ports in OS firewall, run beneath ufw commands on all the nodes, +>$ sudo ufw allow 179/tcp \ +$ sudo ufw allow 4789/udp \ +$ sudo ufw allow 51820/udp \ +$ sudo ufw allow 51821/udp \ +$ sudo ufw reload \ -$ sudo ufw allow 179/tcp -$ sudo ufw allow 4789/udp -$ sudo ufw allow 51820/udp -$ sudo ufw allow 51821/udp -$ sudo ufw reload Verify the status of Calico pods, run +>$ kubectl get pods -n kube-system -$ kubectl get pods -n kube-system -Calico-Pods-Status-Kubernetes-Debian12 - -Perfect, now check nodes status again, - -Nodes-Status-Post-Calico-Installation-K8s-Debian12 - -Great, above confirms that master and worker nodes are in ready staate. Now, we can say our cluster ready handle workload. +Confirm, that master and worker nodes are in ready staate. Now, we can say our cluster ready handle workload. ## Test Kubernetes Cluster Installation In order validate and test Kubernetes cluster installation, let’s try to deploy nginx based application via deployment. Run beneath commands, - -$ kubectl create deployment nginx-app --image=nginx --replicas 2 -$ kubectl expose deployment nginx-app --name=nginx-web-svc --type NodePort --port 80 --target-port 80 +>$ kubectl create deployment nginx-app --image=nginx --replicas 2 \ +$ kubectl expose deployment nginx-app --name=nginx-web-svc --type NodePort --port 80 --target-port 80 \ $ kubectl describe svc nginx-web-svc -Output of above commands, - -Sample-Nginx-Deployment-Kubernetes-Cluster-Debian12 Try to access the nginx based application using following curl command along with the nodeport 32283. Note : In the curl command we can use either of worker node’s hostname. -$ curl http://k8s-worker01:32283 -Access-Nginx-Deployment-Kubernetes-Cluster-Debian12 - -Great, output above confirms that we are able to access our nginx based application. - -That’s all from this guide, I hope you have found it informative and able to install Kubernetes cluster on Debian 12 smoothly. \ No newline at end of file +>$ curl http://k8s-worker01:32283 \ No newline at end of file