kubectl

sudo snap install kubectl --classic 

 

 microk8s.kubectl config view --raw > $HOME /.kube/microk8s.config 

 

 # add the minik8s cluster to kubectl 

 -kubectl config set-cluster microk8s-cluster --server=http: //127.0.0.1:8080 --insecure-skip-tls-verify 

 ich habe stattdessen 

 microk8s.kubectl config view --raw > $HOME/.kube/config 

  verwendet 

 # create the microk8s context 

 kubectl config set-context microk8s --user=admin --cluster=microk8s-cluster 

 

 # switch to the microk8s context 

 kubectl config use-context microk8s 

 

 die Datei auf einem externen Rechner kopieren: 

 scp USERNAME@HOST:/home/USERNAME/.kube/config config