Hi, I am facing the issue after ETCD restore, not able to see the pods: root@con . . .

Lakshmi Narayana Muvvala:
Hi, I am facing the issue after ETCD restore, not able to see the pods:
root@controlplane ~ ➜ k get po -n kube-system
The connection to the server controlplane:6443 was refused - did you specify the right host or port?

unnivkn:
Hi @Lakshmi Narayana Muvvala the above error is expected for few min, but if you see this for long time, then something wrong with your yaml update. If kube-apiserver is not coming up after modifications & normal wait time, then check the logs(below is an example):
controlplane $ cd /var/log/pods/kube-system_kube-apiserver-controlplane_80ec794cc4ee54b7604a6564c4e2604b/
controlplane $ ls
kube-apiserver
controlplane $ cd kube-apiserver/
controlplane $ ls
0.log
controlplane

unnivkn:
Alternatively you can check api-server is up or not by, docker ps -a | grep -i kube-apiserver , if you are using docker as your runtime engine.

Lakshmi Narayana Muvvala:
{“log”:“W0630 07:59:08.593221 1 clientconn.go:1331] [core] grpc: addrConn.createTransport failed to connect to {127.0.0.1:2379 127.0.0.1 \u003cnil\u003e 0
\u003cnil\u003e}. Err: connection error: desc = "transport: Error while dialing dial tcp 127.0.0.1:2379: connect: connection refused". Reconnecting…\n”,“st
ream”:“stderr”,“time”:“2022-06-30T07:59:08.59377954Z”}
{“log”:“E0630 07:59:11.674128 1 run.go:120] "command failed" err="context deadline exceeded"\n”,“stream”:“stderr”,“time”:“2022-06-30T07:59:11.67445119
7Z”}

Lakshmi Narayana Muvvala:
root@controlplane pods/kube-system_kube-apiserver-controlplane_fa700a57d3afe2b3d135eaabd89b878f/kube-apiserver ➜ docker ps -a | grep -i kube-apiserver
56f871c2b7f5 e6bf5ddd4098 “kube-apiserver --ad…” About a minute ago Exited (1) 53 seconds ago k8s_kube-apiserver_kube-apiserver-controlplane_kube-system_fa700a57d3afe2b3d135eaabd89b878f_9
0258cdc3d805 http://k8s.gcr.io/pause:3.6|k8s.gcr.io/pause:3.6 “/pause” 40 minutes ago Up 40 minutes k8s_POD_kube-apiserver-controlplane_kube-system_fa700a57d3afe2b3d135eaabd89b878f_0

root@controlplane pods/kube-system_kube-apiserver-controlplane_fa700a57d3afe2b3d135eaabd89b878f/kube-apiserver ➜

unnivkn:
fyr: https://serverfault.com/questions/976233/context-deadline-exceeded-preventing-pods-from-being-created-in-aks

unnivkn:
https://youtrack.jetbrains.com/issue/IDEA-237609/Kubernetes-Request-Error-Unable-to-connect-to-the-server-context-deadline-exceeded-ClientTimeout-exceeded-while-awaiting-headers|https://youtrack.jetbrains.com/issue/IDEA-237609/Kubernetes-Request-Error-Unable-to-conn[…]ne-exceeded-ClientTimeout-exceeded-while-awaiting-headers

unnivkn:
please check docker logs as well… docker logs <container-id>

Lakshmi Narayana Muvvala:
Sure, will check. Thank you

unnivkn:
fyr: https://github.com/mmumshad/kubernetes-cka-practice-test-solution-etcd-backup-and-restore

Lakshmi Narayana Muvvala:
my test session ended, will start in new session and follow the steps. Thank You @unnivkn

Lakshmi Narayana Muvvala:
Thank you @unnivkn, the above document is worked for restore.

unnivkn:
cool… you welcome