Kubernetes
![][image3]
-
aka k8s
-
pros
- other pros from doc
-
imperative vs declarative
-
self heading/ auto-heal
-
scaling, auto-scale
- HorizontalPodAutoscaler
-
cluster
-
context
-
namespaces
-
annotation
-
namespaces vs annotation vs labels
-
Finalizers
-
Node
- master node
- worker node
- node pool
- Node status
- Node heartbeats
- Node controller
- what it does
- CIDR block
- Node topology
- Graceful node shutdown
- grace period
- non-graceful shutdown
-
Pod
- communicate via
- ephemeral
- atomic
- scaling
- Pods life cycle
- when creating
- when deleting
- grace period
- Pod state
- pending
- running
- succeeded
- failed
- unknow
- CrashLoopBackOff
- init container
- Multi container pods
- sidecar pattern
- ambassador pattern
- adaptor pattern
-
Container
- Images
- - Serial and parallel image pulls
- - image pull policy
- Container Environment
- Container Lifecycle Hooks
- PostStart
- PreStop
-
Kubelet
-
Selectors
- metadata > labels
- spec > selector
-
Workloads
- pod
- replicaSet
- self-heading
- template
- deployment
- replicas
- revisionHistoryLimit
- Strategy
- RollingUpdate
- - maxSurge
- - maxUnavailable
- - default
- - rollback
- - rollout
- Recreate
- daemonSet
- daemon controller
- uses
- spec > toleration
- statefulSet
- persistent identifier
- creation & deletion
- uses
- headless service
- job, cron job
- replicaSet vs deployment
- pods vs deployment
-
Volumes
- persistent volume
- claim
- HostPath
- drawback
- reclaim policies
- delete (default)
- retain
- access modes
- ReadWriteMany
- ReadOnlyMany
- ReadWriteOnce
- states
- available
- bound
- released
- failed
- storage class
- static and dynamic
- persistent volume
-
Objects
-
ConfigMap
- static
- solve static with volume
-
Secret
- type
-
Service
- clusterIP
- port
- targetPort
- nodePort
- load balancer
- L4
- round robin
- ingress
- L7
- clusterIP
-
NodePort
-
k8s Cluster arch
- Node
- container runtime
- containerized
- CRI-O
- kubelet
- kube proxy
- container runtime
- Control Plane / Master node
- kube-api server
- kube-scheduler
- factor when scheduling
- Kube controller manager
- built-in controllers
- Node controller
- job controller
- endpointSlice controller
- serviceAccount controller
- Cloud controller manager
- ETCD
- Addons
- - DNS
- - WEBUI (dashboard)
- - cluster level logging
- - container resource monitoring
- Node
-
Cluster > Node > pod > container
-
CRI
-
Garbage Collection
-
Mixed Version Proxy
-
KubeCTL
-
Minikube
- rollout
-
Open Service Broker.
-
Ingress
-
Docker Swarm vs Kubernetes
-
Security
-
Image
- Untrusted registries
- Vulnerabilities in tools of OS or libraries
-
Authentication & Authorization
-
practices
- use linear images
- image scanning
- don’t use root user
- manage user and permission
- RBAC
-
statefulSet
- master
- slave
-
Yaml
-
apiVersion
-
kind
-
metdat
- name
- label
- namespace
-
spec
- containers
-
Commands k8s
- alias k=kubernetes
- k get
- pods
- svc
- deploy
- k delete -f <deployment.yaml> -f <service.yaml>
- k exec <pod> – nslookup <svc>
-
k config
- current-context
- get-contexts
- use-context <name>
- delete-context <name>
-
namespace
- k get ns or namespace
- k create ns <name>
- k delete ns <name>
- k config set-context --current --ns=<namespace>
- k get pods -n <namespace>
-
node
- k get nodes
- k describe node
-
Probes
- startup
- readiness
- liveness
-
Good to know
-
grep
-
docker compose watch - https://www.youtube.com/live/I-htDVxmFGM?si=5Um3NCnMi0BeAgCz
-
chroot
-
Service Mesh