Term
|
Definition
kubectl get pods --selector app=app1 |
|
|
Term
|
Definition
- used for info only (not selectable) - metadata: labels: app: app1 annotations: version: v1 |
|
|
Term
|
Definition
- does NOT guarantee a specific node! - if pod does NOT tolerate taint - NoSchedule - don't schedule pod ever - PreferNoSchedule - try not to schedule, but not guaranteed - NoExecute - do not schedule any new pods - any pods already scheduled will be killed |
|
|
Term
|
Definition
- add kubectl taint nodes "node" app=blue:NoSchedule - remove kubectl taint nodes "node" app=blue:NoSchedule- |
|
|
Term
|
Definition
spec: tolerations: - key:"app" operator: "Equal" value: "blue" effect: "NoSchedule" |
|
|
Term
|
Definition
spec: nodeSelector: "label1": "value1" |
|
|
Term
|
Definition
kubectl label nodes "node" key=value |
|
|
Term
manually assign pod to node |
|
Definition
|
|
Term
|
Definition
spec: affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - key: size operator: In values: - Large - Medium OR - matchExpressions: - key: size operator: NotIn values: - Small |
|
|
Term
|
Definition
- requiredDuringSchedulingIgnoredDuringExectuion - no placement if no match - if pod already assigned, ignore affinity - preferredDuringSchedulingIgnoredDuringExecution - try to match, but place anyway if no match - if pod already assigned, ignore affinity |
|
|
Term
|
Definition
spec: containers: resources: requests: memory: 1Gi cpu: 1 - cpu 0.1 = 100m = 100 mili 1 = 1 AWS vCPU
- memory 1G (1,000Kb) or 1Gi (1,024Kb) or without suffix (just #'s) |
|
|
Term
|
Definition
- cpu = 1 or 1vCPU - memory = 512Mi
spec: containers: resources: limits: memory: cpu: |
|
|
Term
|
Definition
- cpu - throttle if pass limit - memory - allow pass limit but kill container if continuously pass limit |
|
|
Term
|
Definition
apiVersion: v1 kind: LimitRange metadata: name: limit-range spec: limits: - default: memory: 512Mi defaultRequest: memroy: 256Mi type: Container |
|
|
Term
Running pods & deployments |
|
Definition
- Certain fields in pods cannot be changed when running so get yaml, change yaml, del pod, recreate pod - Deployments can be edited when running and all pods will be deleted and recreated automatically |
|
|
Term
|
Definition
- Replicate pod to every node in cluster - Replicate pod to new nodes in cluster - Delete pods from deleted nodes in cluster - Good for agents like monitoring and logging - e.g. kube-proxy - kubectl get daemonsets or ds |
|
|
Term
|
Definition
- same as replica set - kind: DaemonSet |
|
|
Term
|
Definition
- kubelets read "pod-manifest-path" from kubelet.service file to get pod yaml files. - used for master nodes to create control plane pods (apiserver, etcd, controller, etc.) - pods can be viewed by apiserver, but read-only - ignored by kube scheduler |
|
|
Term
|
Definition
spec: schedulerName: "custom scheduler" |
|
|
Term
|
Definition
|
|
Term
|
Definition
kubectl get pods --all-namespaces | grep "-master" |
|
|