I have a old k8s cluster with 1 master and 2 workers node. It was shutdown for a long time. Now I started it. It had many running pods and deployments. After restart the VM's all k8s command return
The connection to the server 123.70.70.70:6443 was refused - did you specify the right host or port?
What I have done so far?
I saw many stack question to fix this error also on git and some other sites. All need kubeadm reset
If I reset it I will loss all running pods. I don't know how to start those pods again as it was not deployed by me.
What I want? Is there a way I can make all the pods and nodes up and running without reset? Or even if I reset how can I get all the pods back in there running stage? This cluster was design and set it up by someone else I have no idea about its deployments.
Update Question
When I run docker ps -a | grep api
I see this
1a6ba468af3a 123.70.70.70:444/demo/webapikl "dotnet UserProfileA…" 6 months ago Exited (255) 22 hours ago k8s_webapikl-image_webapikl-deployment-74648888d5-bjpcj_fwd_13a76dd9-8ce5
Like this many containers. Now any advice to start them please?
I am new to K8s that's why I like to be sure before I do anything.
First let me explain about the error since you have restarted your servers or nodes (in kubernetes) if the IP address assigned to these nodes is not static the previous cluster configuration will not work and your cluster enters panic mode refer to this doc for making your cluster up and running.
Now as your cluster is up and running you can use kubectl commands for listing all the services, deployments and namespaces. Take a list of all these outputs and generate xml files and store them for backups.
If you are taking downtime and trying to restart your pods it won’t cause any data loss or application failure this document provides details on how to restart multiple pods at same time, but in general multiple restarts are not suggested, hope this addresses your query and if you can provide why are you planning to restart your cluster I can try to provide a more accurate solution.