Shared Flashcard Set

Details

Kubernetes Final
CKA
37
Computer Science
Professional
01/14/2021

Additional Computer Science Flashcards

 


 

Cards

Term
To assign pod to node
Definition
- spec
nodeName: node01
Term
To assign affinity for deploy
Definition
- spec
- template
- spec
affinity:
Term
To assign affinity for pod
Definition
- spec
affinity:
Term
Daemonsets ensure
Definition
pod runs on all nodes
Term
show ports
Definition
netstat -nplt
Term
list ports and listeners
Definition
netstat -npa
Term
For multiple schedulers
Definition
- use yaml in manifest
- change all "port"
- change metadata->name:
- change metadata->labels->component:
- change leader-elect to false
- add --secure-port=0 (if needed)
- add --scheduler-name=my-scheduler
Term
pod args vs command
Definition
- args take precedence over command
- both command and args in quotes when using "command:"
- only args in quotes when using "args"
- all in quotes when using []
Term
Docker Yaml
Definition
- pod command = ENTRYPOINT
- pod args = CMD
- pod command overrides CMD & ENTRYPOINT
Term
To apply ConfigMap or Secrets to pod
Definition
- can be done via envFrom
- can be done via volumes
Term
ETCD backup
Definition
- ETCDCTL_API=3
- snapshot save
- OR get cluster.name
- --cacert=etcd-ca.pem
- --cert=etcd-server.crt
- --key=etcd-server.key
Term
Dynamic storage classes have
Definition
no-provisioner
Term
Docker int state
Definition
ip link show docker0
Term
For weave
Definition
search for "cloud.weave.works"
Term
Weave nw range
Definition
search for ipalloc in any weave pod
Term
Service NW range
Definition
search for cluster-ip-range in kube-apiserver yaml file
Term
kube-proxy type
Definition
see logs for any kube-proxy pod
Term
To get ingress resources
Definition
kubectl get ingress -all-namespaces
Term
kube-proxy & ConfigMap
Definition
- filename under ConfigMap "DATA" field is used in kube-proxy DS yaml file for --config=dir/filename
Term
Verify kube-dns
Definition
- kubectl -n kube-system get ep kube-dns
- Ensure kube-dns svc selector matches core-dns label
Term
kube-controller-manage & kube-scheduler
Definition
Have no EP's
Term
docker logs
Definition
- docker ps -a | grep blah
- docker logs cont-id
Term
To use (view) a different kubectl config
Definition
kubectl config (view) --kubeconfig= (cmds)
Term
apply docker secrets
Definition
- spec->imagePullSecrets->dash name
Term
apply secrets to env vars
Definition
- spec->containers->envFrom->secretRef->name
Term
nslookup for pods
Definition
XX-XX-XX-XX.default.pod.cluster.local
Term
test network policy
Definition
- create busybox
- exec -- nc -z -v -w 2 svc_name port
Term
Start a shell in a pod
Definition
kubectl exec -it /bin/sh
Term
Create BB and run cmd
Definition
kubectl run busybox --image=busybox -- /bin/sh -c "sleep 3600"
Term
log verbosity
Definition
kubectl get pod --v=<0-9>
Term
Kubelete cert rotation
Definition
--rotate-certifcates
--rotate-server-certificates
Term
Pods that don't need API server
Definition
Static Pods
Term
ClusterIP vs NodePort
Definition
- ClusterIP within cluster
- NodePort outside cluster
Term
POD PVC
Definition
pod -> pvc -> pv -> storageClass
Term
RB & CR
Definition
- RB can reference CR to limit by namespace
Term
--as SA
Definition
system:serviceaccount::
Term
ETCD Restore
Definition
- RUN ON ETCD SERVER!
- sudo stop etcd service
- sudo rm /var/lib/etcd (old db)
- Restore:
- ETCDCTL_API=3
- snapshot restore
--initial-cluster etcd-restore=https://etcd1:2380
--initial-advertise-peer-urls https://etcd1:2380
--data-dir /var/lib/etcd
--name etcd-restore
- sudo chown -R etcd:etcd /var/lib/etcd
- sudo restart etcd service
- TEST with get cluster.name
Supporting users have an ad free experience!