Kubernetes is a distributed container orchestration platform
for automating deployment and management of applications at scale.
Node: a physical or virtual machine that contributes resources
Cluster: a group of master control plane and worker data plane nodes
image: https://faun.pub/kubernetes-chronicles-k8s-01-introduction-to-kubernetes-architecture-18cad51d270f
kube-apiserver: allows user interaction with the cluster (CLI/UI)
etcd: stores key-value pairs for cluster configuration (state, parameters, secrets)
kube-scheduler: decides which node a pod will run on
kube-controller-manager: shifts the actual state of the cluster to the desired state (acts as cluster thermostat)
For high availability,
the control plane runs on multiple nodes.
kubelet: agent that ensures that containers are running, reports to the apiserver
kube-proxy: facilitates networking between pods and handles external traffic
container runtime: (ie. Docker) pulls and runs container images from a registry
Pod: the smallest computational unit, plugs&plays container(s), ephemeral in nature
*
Deployment: manages the lifecycle of identical pods by scaling, updating, self-healing
*
ConfigMap/Secret: holds data as key-value pairs, passwords and keys kept secret
*
Service: provides a stable IP address and DNS name for reaching a deployment
StatefulSet: same as a deployment but for applications with persistent storage
*
Persistent Volume (PV): represents a piece of storage that can be attached to pods
*
Persistent VolumeClaim (PVC): requests PV resources with specific characteristics
*
Namespace: groups and isolates kubernetes objects in seperate spaces
Label: nametags kubernetes objects; useful to select, identify, inform
brew install minikube
minikube start
minikube dashboard
docker ps # 🤯
minikube config set memory 4096
kubectl get # watch kubectl get all
k9s
an important file: ~/.kube/config
kubectl run minicurl --image=curlimages/curl -i --tty -- sh
kubectl apply -f hello-k8s-message.yaml # or through dashboard
kubectl apply -f kubesnake.yaml # or through dashboard
minikube ip # or minikube service --url
minikube delete # 💥
example1: hello-k8s-message.yaml
| example2: kubesnake.yaml