Hi, In the process of restoring the etcd snapshot I followed the lecture and tried to stop the kube-apiserver service but failed. Moreover, I found some recommendation in docs regarding stopping and restarting the important services but in solution video the instructor hasn’t stop any service. Can somebody please let me know, whether we need to stop any service before restoring. Kubernetes docs recommendation :-
If any API servers are running in your cluster, you should not attempt to restore instances of etcd. Instead, follow these steps to restore etcd:
• stop all API server instances
• restore state in all etcd instances
• restart all API server instances
We also recommend restarting any components (e.g.
kubelet) to ensure that they don’t rely on some stale data. Note that in practice, the restore takes a bit of time. During the restoration, critical components will lose leader lock and restart themselves.
Hello, @Ravi Singh
In a lab, k8s cluster is set up by the
kubeadm tool so you won’t see control plane components in a form of service. Instead all control plane components are deployed in a form of static pods.
Command to list the static pods -
kubectl get pods -n kube-system
You can setup k8s cluster (Hard-way) in your local environment, In a hard-way, you will configure all controlplane components in a service form.
@Tej_Singh_Rana Hey thanks bhai