
Description:
- Container orchestration engine by:
- Automating deployment, scaling, and management of containerized applications.
- Docs and Ref
- Why?
- manage multiple hosts container orchestration
- auto-scaling
- load-balancing
- self-healing
- rolling updates and rollbacks
- context = user + cluster + namespace
- v1.34
A. Documentations v1.34
B. Getting started
1. Learning environment
2. Prod environment:
3. Best practices
C. Concepts:
1. Overview:
Components:
The Kubernetes API:
2. Cluster Architecture:
.
3. Containers:
4. Workloads:
2. Workload management:
3. Autoscaling workloads
4. Managing workloads
5. Vertical pod autoscaling
5. Service, load balancing and networking:
0
- The Kubernetes network model***
- each pod in a cluster gets its own cluster-wide unique IP address
- containers in a pod are in same namespace, communicated with eachother over
localhost
- The pod network (cluster network) handles communication between pods, ensure that
- all pods can communicate with all other pods, same or different node, without proxy or NAT
- agents on a node (system daemons, or kubelet daemon) can communicate with all pods on that node
- Kubernetes Service API create a long-lived IP or hostname for a service implemented by one or more backend pods
- K8s Gateway API allows you to make services accessible to clients that are outside the cluster
- K8s Network Policy is a built-in Kubernetes API that allows you to control traffic between pods, or between pods and the outside world.
…
Service ClusterIP allocation
6. Storage:
7. Configuration
8. Security
9. Policies
10. Scheduling, preemption and eviction
Assigning pods to Nodes
- Node Label
- nodeSelector
- strict placement → atleast 1 node must match every labels for it to be scheduled
- Affinity and anti-affinity
- Node Affinity
- inter-pod affinity and anti-affinity:
- Types of Inter-pod Affinity and Anti-affinity
- Scheduling behavior:
- hard constraints: node filtering
podAffinity.requiredDuringSchedulingIgnoredDuringExecution and podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution
-
Scheduling a Group of Pods with Inter-pod Affinity to Themselves
nodeName
nominatedNodeName
- Pod topology spread constraints
- Operators
Pod overhead
- Concept:
- A Taint is applied to a node to indicate that it should not accept certain pods unless they explicitly tolerate it.
- A taint repels all pods that do not have a matching toleration
- adding nodeName to a pod will bypass scheduler
- if the node also has
NoExecute taint set, the kubelet will eject the pod if it doesnt have right tolerant
- allowed value for
effect:
NoExecute:
- pods that do not tolerate are evicted immediately
- pods that telerate will remaind for
tolerationSeconds if set, otherwise forever
NoSchedule:
- running pods say running, no new pod without toleration
PreferNoSchedule:
- Control plane will try to avoid if there is other node
- Multiple taints and tolerations can be added…
- uses cases:
- Dedicated node: can be set so that a node can only be used by a user or group (Admission Control)
- Nodes with special hardware: …
- Tainted-based eviction
- Tainted based eviction:
- Taintnodes by condition
11. Cluster administration:
Cluster networking
12. Windows in kubernetes
13. Extending kubernetes
D. Tasks:
2. Adminster a cluster with kubeadm
6.
8. Run applications:
9. Run jobs
E. Tutorials
F. Reference
Kubernetes API
Workload resources
- written in each object’s API section
…
Common definition:
API access control
Admission Control
Networking reference