Thursday, August 13, 2026

How to stop the kube-controller

 --https://share.google/aimode/WsKMDrUDIEfrwNVa5


For this error I am trying ->

~$ sudo ss -lntp | grep -E '6443|10250|10257|10259'

LISTEN 0      4096            127.0.0.1:10257      0.0.0.0:*    users:(("kube-controller",pid=3421,fd=4))                                                                                      

LISTEN 0      4096            127.0.0.1:10259      0.0.0.0:*    users:(("kube-scheduler",pid=3396,fd=4))                                                                                       

LISTEN 0      4096                    *:6443             *:*    users:(("kube-apiserver",pid=3378,fd=4))                                                                                       

LISTEN 0      4096                    *:10250            *:*    users:(("kubelet",pid=3026,fd=17))                    


Article Starts Here,-

To stop the kube-controller-manager, you must use the method that matches how your Kubernetes cluster was originally deployed. Because the controller manager usually runs as a self-healing component, simply killing its process or deleting its pod will cause Kubernetes to automatically restart it. [1, 2, 3]
Here are the three most common ways to stop it:
Method 1: For Kubeadm Clusters (Static Pods)
Most standard clusters deployed via kubeadm run the controller manager as a static pod managed directly by the local kubelet service. To stop it, you must move its manifest file out of the tracked directory. [1, 2]
  1. Log in to your Kubernetes master/control-plane node via SSH.
  2. Move the manifest file out of the default directory to a backup location:
    bash
    sudo mv /etc/kubernetes/manifests/kube-controller-manager.yaml /tmp/
    
    குறியீட்டைக் கவனமாகப் பயன்படுத்துங்கள்.
  3. Wait a few moments. The kubelet will notice the file is missing and automatically terminate the kube-controller-manager pod. [1, 2, 3, 4]
Note: To start it again later, simply move the file back to /etc/kubernetes/manifests/. [1, 2]
Method 2: For Binaries Installed via Systemd
If your cluster was built from scratch ("Kubernetes the Hard Way") and runs components directly on the host OS, it is managed as a standard Linux service. [1, 2, 3, 4]
  1. Log in to your control-plane node.
  2. Stop the systemd service:
    bash
    sudo systemctl stop kube-controller-manager
    
    குறியீட்டைக் கவனமாகப் பயன்படுத்துங்கள்.
  3. Disable the service (Optional—prevents it from starting up again after a system reboot):
    bash
    sudo systemctl disable kube-controller-manager
    
    குறியீட்டைக் கவனமாகப் பயன்படுத்துங்கள்.
    [1, 2]
Method 3: For Managed Docker Deployments (e.g., RKE)
If you are running a deployment where the control plane components run as standard Docker containers managed outside of Kubelet static pods (such as Rancher's RKE): [1, 2]
  1. Log in to the control-plane host machine.
  2. Find the container ID:
    bash
    sudo docker ps | grep controller-manager
    
    குறியீட்டைக் கவனமாகப் பயன்படுத்துங்கள்.
  3. Stop the container:
    bash
    sudo docker stop kube-controller-manager
    
    குறியீட்டைக் கவனமாகப் பயன்படுத்துங்கள்.
    [1]
If you'd like, let me know:
  • How your cluster was set up (e.g., Kubeadm, EKS/AKS, or custom binaries)
  • Your ultimate goal (Are you troubleshooting an issue, upgrading, or shutting down the whole cluster?)
I can provide the exact commands tailored to your environment.

No comments: