Professional Documents
Culture Documents
Kubernetes Draft
Kubernetes Draft
Kubernetes Draft
Architecture:
Master Node
Api Server – kubi-apiserver -
ETCD – distributed database – all configurations are stored here – desired state - HA
Scheduler – kube-scheduler – schedule PODS on specific nodes
Controller Manager – manages health of the cluster – responsible that state matches desired
state
kubectl get componentstatuses
Worker Nodes
Kubelet – node agent – monitors node and communicates to master
PODS
Kube-proxy – networking component – service exposing
Container runtime – docker, rkt, podman
Service
LoadBalancer – Internal and External port
Kubernetes ClusterIP Service – accesed from inside cluster
kubectl get service service_name -o yaml
Kubernetes provides env variables for services
Kubernetes provides DNS and loadbalancing for free by using service names
Rollout
kubectl rollout history deployment DEPL_NAME
kubectl set image deployment DEPL_NAME CONTAINER_NAME=DOCKER_IMAGE –
record=true # the record will save the command in the rollout history
kubectl rollout undo deployment DEPL_NAME –to-revision=VERSION – rollback
Deployment vs Replicaset
Replicaset does not know about a deployment strategy
A deployment cares about the new release versions
Kubernetes commands
kubectl get pods –all-namespaces
kubectl cluster-info
kubectl top node / pod
DNS
As soon as a service is started up, it is registered with Kubernetes DNS
ConfigMaps
Centralized configuratio
kubectl apply -f configmap.yaml
Use in a deployment – valueFrom:
Ingress
Service type – NodePort
Every path like /currency redirect to a specific service on specific port
HELM
2 components – helm
- tiller – can run on any worker node
Standardization
give tiller permission to deploy to any namespace, create a new service account