Term
|
Definition
- Auth User - Val req - Retrieve data - Only service that updates ETCD - Talks to Scheduler - Talks to Kubelet |
|
|
Term
|
Definition
Single process that manages all controllers |
|
|
Term
|
Definition
- Decides which pods go on which nodes - Filters based on # cpu's, mem, etc. - Ranks remaining nodes (0-10) where nodes with larger # remaining resources after pod install gets higher score |
|
|
Term
|
Definition
- control actions on nodes - loads pods - talks to kube-apiserver - talks to docker |
|
|
Term
|
Definition
- process that runs on each node - allows nodes to access each other without IP's in the POD NW - uses ip tables |
|
|
Term
|
Definition
- encapsulates docker containers - single instance of an app - different containers can exist in same pod but not same container in same pod - share same localhost and memory in a single pod and have same fate (are created or die together) |
|
|
Term
|
Definition
- must have apiVersion, kind, metadata, spec |
|
|
Term
kubectl create -f <>.yaml |
|
Definition
|
|
Term
|
Definition
|
|
Term
|
Definition
|
|
Term
|
Definition
apiVersion: v1 kind: Pod metadata: name: "pod name" labels: app: "label" spec: containers: - name: "container name" image: "image name" |
|
|
Term
To see what nodes a pod is running on |
|
Definition
|
|
Term
|
Definition
|
|
Term
|
Definition
- Ensures the number of specified pods is always running (1 or more) - Load Balancing & scaling across a single node or multiple nodes - Being replaced by replica set |
|
|
Term
kubectl get replicationcontroller |
|
Definition
|
|
Term
ReplicationController yaml |
|
Definition
- apiVersion: v1 - kind: ReplicationController - metadata: - spec: template: metadata: name: labels: app: "label" spec: selector: app: "label" replicas: # |
|
|
Term
|
Definition
- apiVersion: apps/v1 - kind: ReplicaSet - metadata: - spec: template: metadata: name: labels: "label" spec: selector: matchLabels: app: "label" replicas: # |
|
|
Term
|
Definition
apiVersion: kind: metadata: name: labels: app: type: spec: containers: - name: image |
|
|
Term
Increase/Decrease Replicas |
|
Definition
- Change yaml file and recreate - kubectl scale --replicas=# -f rs.yaml - kubectl scale replicaset "rs name" --replicas=# - kubectl scale deployment "dep name" --replicas=# |
|
|
Term
|
Definition
kubectl delete replicaset rs-name |
|
|
Term
|
Definition
|
|
Term
|
Definition
- Same as RS - kind: Deployment |
|
|
Term
|
Definition
kubectl get pods,rc,rs,deploy,svc, all |
|
|
Term
|
Definition
kubectl run --generator=run-pod/v1 nginx --image=nginx (--dry-run -o yaml) |
|
|
Term
|
Definition
kubectl create deployment --image=nginx nginx (--dry-run -o yaml) kubectl run "dep name" --image=nginx |
|
|
Term
|
Definition
- create = creates whole new object - apply = updates existing object |
|
|
Term
|
Definition
kubectl get deployment.apps |
|
|
Term
|
Definition
- default namespaces - default,kube-system,kube-public - "svc name"."namespace".svc.cluster.local - namespace yaml: apiVersion: v1 kind: Namespace metadata: name: "namespace" - deploy,rs,rc yaml: metadata: namespace: "namespace" |
|
|
Term
|
Definition
- kubectl get namespace or "ns for short" - kubectl get pods --namespace="namespace" (or -n="namespace") - kubectl create ns "namespace" - kubectl create -f namespace.yaml - kubectl config set-context $(kubectl config current-context) --namespace="namespace" - kubectl get pods --all-namespaces |
|
|
Term
Imperative vs Declarative |
|
Definition
- imp - kubectl app - yaml files - Dec - all kubectl cmds except apply |
|
|
Term
kubectl replace -f file.yaml |
|
Definition
- to apply changes in yaml to running config (saved locally) - --force will delete and recreate |
|
|
Term
|
Definition
- -f file.yaml - -f /path_to_files/* - no need to worry if objs already exist |
|
|
Term
|
Definition
- kubectl expose pod "pod" --name="srv" --type=NodePort --port=8- --target-port=80 - kubectl create service nodeport "srv" --tcp="port":"targetport" |
|
|
Term
|
Definition
- NodePort - int access by ext - CluserIP - VIP created for int pods - LoadBalancer |
|
|
Term
|
Definition
- TargetPort - port on pod - port - port on service - NodePort - port on node for ext use - range = 30000 - 32767 |
|
|
Term
|
Definition
apiVersion: v1 kind: Service metadata: name: myapp-service spec: type: NodePort ports: - targetPort: 80 (assume = port if not given) port: 80 nodePort: 30000 (auto assign if not given) selector: app: web |
|
|
Term
|
Definition
apiVersion: v1 kind: Binding metadata: name: target: apiVersion: v1 kind: Node name: "nodename" |
|
|
Term
To see if a scheduler is running |
|
Definition
kubectl -n kube-system get pods |
|
|
Term
Get/Save running pod yaml |
|
Definition
kubectl get pod "name" -o yaml > pod.yaml |
|
|
Term
Create busybox with shell |
|
Definition
kubectl run -i --tty busybox --image=busybox --restart=Never -- sh |
|
|
Term
|
Definition
kubectl config set-context --current --namespace= |
|
|
Term
|
Definition
- kubectl get svc - kubectl get ep - endpoints |
|
|