Kubernetes
From wikinotes
Kubernetes is a container-cluster management system. It was written at google.
NOTE:
These notes are early learning, they will eventually need to be divided into sensibly categorized pages.
Documentation
official docs https://kubernetes.io/docs/home/ official tutorials https://kubernetes.io/docs/tutorials/
Terminology
node A worker machine/vm. https://kubernetes.io/docs/concepts/architecture/nodes/ deployment Desired configuration state
(network, containers, volumes, ...)https://kubernetes.io/docs/concepts/workloads/controllers/deployment/ pod Instance of a deployed deployment. https://kubernetes.io/docs/concepts/workloads/pods/pod-overview/ See Also: https://kubernetes.io/docs/concepts/
Systems
system tools description minikube kubectl
Install
kubernetes is not itself an OS, install within any linux distro
Usage
kubectl get (nodes|deployments|pods)Cluster
# minikube is a testing-VM, containing a single node minikube version # list testvm version minikube start # start testvm # kubectl interacts with node's kubernetes client kubectl version # list client versions kubectl cluter-info # list ip-addrs kubectl get nodes # list all nodesDeployments
kubectl create deployment NAME \ --image=gcr.io/google-samples/kubernetes-bootcamp:v1 kubectl get deploymentsProxy
Kubernetes manages a private network between nodes.
kubectl proxy
allows entry into that private network. It also creates a RESTAPI-endpoint for each pod within the cluster.kubectl proxy # proxy into cluster' private netwk curl 'http://localhost:8001/version' #