In an Ubuntu host CLI, we can use snap to install microk8s for testing. Put the current user in the microk8s group and alias the kubectl command also.

sudo snap install microk8s --classic
sudo usermod -a -G microk8s <username>
echo "alias kubectl='microk8s.kubectl'" >> ~/.bashrc
# Enable CoreDNS:
microk8s.enable dns
# Check status of what is running:

Basic interaction, exploring resource types:

kubectl get nodes
kubectl get nodes -o wide
kubectl get nodes -o yaml

kubectl describe nodes/<node name>
# Show available resource types:
kubectl api-resources
kubectl explain <type>
kubectl explain node.kind
kubectl explain node --recursive

Namespace basics

kubectl get namespaces
kubectl get pods --all-namespaces
kubectl get pods --namespace default

Run a pod:

# Equivalent to docker run command.
kubectl run pingpong  --image alpine ping
kubectl logs pod/pingping --tail 1 --follow