Kubernetes

#Runing Local

#Docker Desktop

Read the full Manual.

  • From the Docker Dashboard, select the Settings.
  • Select Kubernetes from the left sidebar.
  • Next to Enable Kubernetes, select the checkbox.
  • Select Apply & Restart to save the settings and then select Install to confirm. This instantiates images required to run the Kubernetes server as containers, and installs the /usr/local/bin/kubectl command on your machine.

#Other Options

minikube, kind, minishift, CRC, ansible’s kubespray with Vagrant (e.g. k8s-cluster)

#Running Commands

#Namespaces

# set space
kubectl config set-context --current --namespace=ns1

# get namespace
kubectl config view --minify -o jsonpath='{..namespace}'  # json
kubectl config view | grep namespace                      # pipes
kubectl describe sa default | grep Namespace              # using sa

#List of Kubernetes API resources and subresources?

# https://stackoverflow.com/q/49396607
kubectl api-resources -o wide