简体   繁体   English

如何从 ubuntu 16.04 LTS 中删除 Kubectl

[英]How to remove Kubectl from ubuntu 16.04 LTS

I've followed guide to install kubectl for testing in development environment on Ubuntu 16.04.我已经按照指南安装 kubectl 以在 Ubuntu 16.04 的开发环境中进行测试。

Now I would like to remove Kubectl from ubuntu.现在我想从 ubuntu 中删除 Kubectl。

Depending on the method you chose in https://kubernetes.io/docs/tasks/tools/install-kubectl/ , it can be any of these:根据您在https://kubernetes.io/docs/tasks/tools/install-kubectl/ 中选择的方法,它可以是以下任何一种:

  • Install kubectl binary via curl: sudo rm /usr/local/bin/kubectl通过 curl 安装 kubectl 二进制文件: sudo rm /usr/local/bin/kubectl
  • Download as part of the Google Cloud SDK: gcloud components remove kubectl作为 Google Cloud SDK 的一部分下载: gcloud components remove kubectl
  • Install with snap on Ubuntu (just as Gparmar said): snap remove kubectl在 Ubuntu 上使用 snap 安装(正如 Gparmar 所说): snap remove kubectl

In addition, you may need to remove the configuration files in ~/.kube .此外,您可能需要删除~/.kube中的配置文件。

sudo -i

Once you get root access then apply command一旦你获得 root 访问权限,然后应用命令

unset DOCKER_HOST

You can use unset DOCKER_HOST command to remove/unset the Kubernetes service.您可以使用unset DOCKER_HOST命令删除/取消设置 Kubernetes 服务。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM