Static Pods-Kubernetes Certification- Crack the CKA with WeMakeDevOps.
2.1 هزار بار بازدید -
4 سال پیش
-
Static Pods are managed directly
Static Pods are managed directly by the kubelet daemon on a specific node, without the API server observing them.
https://kubernetes.io/docs/tasks/conf...
Problem : Static pod creation in a specified node in a given k8 cluster. Note: Managed by Kubeadm
Twist 1: it will be in a worker node not in master node
Create a pod manifest file in master node
Note: Here i am doing in default namespace
Kubernetes Certification- Crack the C...
kubectl run --generator=run-pod/v1 nginx --image=nginx --dry-run -o yaml
Put out put in test.yaml file
Copy file in given worker node
scp test.yaml node01:/etc/kubernetes/manifests
ssh to that node to execute kubelet daemon.
Twist: 2
There is no static pod directory defined in /var/lib/kubelet/config.yaml for that particular node ,
Solution:
a)
You need to add below line in above file in /var/lib/kubelet/config.yaml
staticPodPath: /etc/kubernetes/manifests
b than just copy pod.yaml in /etc/kubernetes/manifests
c Restart the Kubelet if required do daemon restart as well.
service kubelet stop
service kubelet start
Check on the master node that static pod created or not in default namespace .
https://kubernetes.io/docs/tasks/conf...
Problem : Static pod creation in a specified node in a given k8 cluster. Note: Managed by Kubeadm
Twist 1: it will be in a worker node not in master node
Create a pod manifest file in master node
Note: Here i am doing in default namespace
Kubernetes Certification- Crack the C...
kubectl run --generator=run-pod/v1 nginx --image=nginx --dry-run -o yaml
Put out put in test.yaml file
Copy file in given worker node
scp test.yaml node01:/etc/kubernetes/manifests
ssh to that node to execute kubelet daemon.
Twist: 2
There is no static pod directory defined in /var/lib/kubelet/config.yaml for that particular node ,
Solution:
a)
You need to add below line in above file in /var/lib/kubelet/config.yaml
staticPodPath: /etc/kubernetes/manifests
b than just copy pod.yaml in /etc/kubernetes/manifests
c Restart the Kubelet if required do daemon restart as well.
service kubelet stop
service kubelet start
Check on the master node that static pod created or not in default namespace .
4 سال پیش
در تاریخ 1399/03/24 منتشر شده
است.
2,152
بـار بازدید شده