sh 如何在Linux上使用microk8s(Mint)

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh 如何在Linux上使用microk8s(Mint)相关的知识,希望对你有一定的参考价值。

# install snap
sudo apt install snapd

# install microk8s
snap install microk8s --classic

# enable dns, dashboard, and storage
microk8s.enable dns dashboard storage

microk8s.kubectl proxy
# access dashboard: http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/

# look for hints to complete installation, warnings would appear
microk8s.inspect

# IMPORTANT - if your services should call out of your cluster, you should set the iptables rule:
sudo iptables -P FORWARD ACCEPT

# copy kubeconfig to .kube, to use helm and kubectl with the microk8s instance
microk8s.kubectl config view --raw > ~/.kube/microk8s.config
export KUBECONFIG=$KUBECONFIG:$HOME/.kube/microk8s.config
kubectl config view
kubectl config use-context microk8s

# install Helm/Tiller
sudo snap install helm --classic
helm init # make sure to use the context: microk8s

# Start/Stop commands
microk8s.start
microk8s.stop

以上是关于sh 如何在Linux上使用microk8s(Mint)的主要内容,如果未能解决你的问题,请参考以下文章

如何使用默认 Ingress 使用 Kubernetes microk8s 设置 Letsencrypt?

在 WSL 2 上使用 Ansible 通过 snap 安装 microk8s

Microk8s 无法在 Longhorn 上自动安装 pod

我如何杀死 microk8s Kubernetes?

使用 microk8s 从主机简单入口?

Microk8s 入口返回 502