export KUBECONFIG=/Users/dev/k0s-ansible/inventory/multipass/artifacts/k0s-kubeconfig.yml
kubectl cluster-info
kubectl get nodes -o wide
注意:前三个控制平面节点将不会显示,因为控制平面是完全隔离的。要检查分布式etcd集群,您可以使用ssh安全地记录控制器节点,也可以运行以下ad-hoc命令:
kubectl create deployment nginx --image=gcr.io/google-containers/nginx --replicas=5
kubectl create deployment nginx --image=gcr.io/google-containers/nginx --replicas=5
kubectl expose deployment nginx --target-port=80 --port=8100
kubectl run hello-k0s --image=quay.io/prometheus/busybox --rm -it --restart=Never --command -- wget -qO- nginx:8100