How to find out the kubernetes master server corresponding to a worker node? How to kill residual k8s containers?

7/30/2018
  1. I have no idea what is going on in my ubuntu VM. It was working as a 'worker k8s node' once upon a time, but I have dismantled that k8s cluster TOTALLY. That said, there is no master now corresponding to this VM now.
  2. But still, I see the below containers are running in my VM (Which I would still call as worker VM).
 ~$ docker ps
CONTAINER ID        IMAGE                                      COMMAND                  CREATED             STATUS              PORTS               NAMES
2481e38e9a7a        k8s.gcr.io/kubernetes-dashboard-amd64      "/dashboard --inse..."   2 minutes ago       Up 2 minutes                            k8s_kubernetes-dashboard_kubernetes-dashboard-77d8b98585-c257p_kube-system_ecd335b0-7469-11e8-b4d7-fa163e1912b6_1
8ca28af62b8f        k8s.gcr.io/k8s-dns-sidecar-amd64           "/sidecar --v=2 --..."   3 minutes ago       Up 3 minutes                            k8s_sidecar_kube-dns-54cccfbdf8-tj5rv_kube-system_edee9d35-7469-11e8-b4d7-fa163e1912b6_0
9207d2eb56b2        k8s.gcr.io/k8s-dns-dnsmasq-nanny-amd64     "/dnsmasq-nanny -v..."   3 minutes ago       Up 3 minutes                            k8s_dnsmasq_kube-dns-54cccfbdf8-tj5rv_kube-system_edee9d35-7469-11e8-b4d7-fa163e1912b6_0
031dab934bfa        k8s.gcr.io/k8s-dns-kube-dns-amd64          "/kube-dns --domai..."   3 minutes ago       Up 3 minutes                            k8s_kubedns_kube-dns-54cccfbdf8-tj5rv_kube-system_edee9d35-7469-11e8-b4d7-fa163e1912b6_1
13fe0b47078a        gcr.io/google_containers/pause-amd64:3.0   "/pause"                 3 minutes ago       Up 3 minutes                            k8s_POD_kube-dns-54cccfbdf8-tj5rv_kube-system_edee9d35-7469-11e8-b4d7-fa163e1912b6_0
b8560cb57ecb        gcr.io/google_containers/pause-amd64:3.0   "/pause"                 3 minutes ago       Up 3 minutes                            k8s_POD_kubernetes-dashboard-77d8b98585-c257p_kube-system_ecd335b0-7469-11e8-b4d7-fa163e1912b6_0
  1. I tried to kill the running container, stop them using kubeadm reset, I even tried removing all the k8s packages. The packages are all removed. kubectl, kubeadm, kubelet commands do not work, but as soon as I start docker service, above containers are created too.
  2. I was also using minikube earlier, so I removed minikube packages.
  3. On the previous master node, kubectl get nodes doesnt list this node.
  4. How do I know which matser is tring to contact this?

Not sure how do I stop all those containers now. (Ultimately I want to make this VM part of anothe rk8s cluster)

Any help?

-- Madhusoodan
docker
kubernetes
minikube
ubuntu
ubuntu-16.04

1 Answer

9/23/2019

/etc/kubernetes/kubelet.conf

This file has the IP to which it was communicating earlier.

-- Sridhar
Source: StackOverflow