简体   繁体   English

如何杀死 microk8s kubernetes?

[英]How do I kill microk8s kubernetes?

I took a course a while ago on Kubernetes.不久前我参加了关于 Kubernetes 的课程。 I used my Ubuntu 20.04.3 LTS laptop to set up the environment for educational purposes.我使用我的 Ubuntu 20.04.3 LTS 笔记本电脑来设置用于教育目的的环境。

I used microk8s as my Kubernetes distribution.我使用 microk8s 作为我的 Kubernetes 发行版。

I recently noticed that there were the following processes using about 1/2 GB of memory:我最近注意到有以下进程使用了大约 1/2 GB 的 memory:

kube-apiserver
kube-controller
kubelet

They are all running as root.它们都以 root 身份运行。

This is their specific version information.这是他们的具体版本信息。

Client Version: version.Info{Major:"1", Minor:"20+", GitVersion:"v1.20.13-35+005120472f128e", GitCommit:"005120472f128ee37994ebbe34eb340d4a580a95", GitTreeState:"clean", BuildDate:"2021-11-18T08:25:58Z", GoVersion:"go1.15.15", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"20+", GitVersion:"v1.20.13-35+005120472f128e", GitCommit:"005120472f128ee37994ebbe34eb340d4a580a95", GitTreeState:"clean", BuildDate:"2021-11-18T08:26:57Z", GoVersion:"go1.15.15", Compiler:"gc", Platform:"linux/amd64"}

I tried to kill the processes by using the following method:我尝试使用以下方法终止进程:

sudo kill -9 {pid}

However, the processes came back!但是,过程又回来了!

How do I kill a microk8s kubernetes cluster?如何杀死 microk8s kubernetes 集群? I do not care about retaining any data and I do not want the cluster to restart on boot.我不关心保留任何数据,也不希望集群在启动时重新启动。

You can remove the microk8s using following command in ubuntu:您可以在 ubuntu 中使用以下命令删除 microk8s:

sudo snap remove microk8s

The above command should remove all the services from your laptop.上面的命令应该从您的笔记本电脑中删除所有服务。

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

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