How to remove Kubectl from ubuntu 16.04 LTS

7/3/2017

I've followed guide to install kubectl for testing in development environment on Ubuntu 16.04.

Now I would like to remove Kubectl from ubuntu.

-- Gparmar
kubernetes
ubuntu

2 Answers

7/13/2018
sudo -i

Once you get root access then apply command

unset DOCKER_HOST

You can use unset DOCKER_HOST command to remove/unset the Kubernetes service.

-- Pramod Lawate
Source: StackOverflow

7/4/2017

Depending on the method you chose in https://kubernetes.io/docs/tasks/tools/install-kubectl/, it can be any of these:

  • Install kubectl binary via curl: sudo rm /usr/local/bin/kubectl
  • Download as part of the Google Cloud SDK: gcloud components remove kubectl
  • Install with snap on Ubuntu (just as Gparmar said): snap remove kubectl

In addition, you may need to remove the configuration files in ~/.kube.

-- Javier Salmeron
Source: StackOverflow