Certified Kubernetes Application Developer practice exam questions fully solved & updated.
alias k='kubectl' Set up alias k run {name} --image={imageName} --restart=Never Run a pod 6 Ways to Show Appreciation for Your Child's Teacher Previous Play Next Rewind 10 seconds Move forward 10 seconds Unmute 0:26 / 0:54 Full screen -o yaml --dry-run Dry run to Yaml k create -f {filename}.yaml Run from yaml k get pods --show-labels Show all labels of pods k label pod {podname} {newLabel}={newValue} --overwrite Change the label of a pod k get po -L {labelName} Get all pods and show the value of a given label k get pods -l {labelName}={labelValue} Get pods with label name and value k label pods {podName} {podName} {labelName}- Remove a label from existing pods apiVersion: v1 kind: Pod metadata: name: cuda-test spec: containers: - name: cuda-test image: " nodeSelector: # add this accelerator: nvidia-tesla-p100 # the slection label Create a pod that will be deployed to a Node that has the label 'accelerator=nvidia-tesla-p100' kubectl annotate po nginx1 nginx2 nginx3 description='my description' Annotate pods nginx1, nginx2, ngingx3 with "description='my description'" value kubectl describe po nginx1 | grep -i 'annotations' Check the annotations for pod nginx1 k annotate po {podName} {podName} description- Remove the annotations for pods an open-source system for automating deployment, scaling and management of containerised applications Define Kubernetes Taint Toleration Annotation A pod consists of one or more containers which share an IP address, access to storage and a namespace Pod Heavy lifter for changes and configuration on worker nodes kubelet agent k config current-context Get current kubectl context k exec -t {podName} {optional:containerName} -- /bin/sh Exec into a pod shell Sits alongside a container in a pod and performs functions which are decoupled from the main application (such as logging). Sidecar container Modify data, on ingress or egress, to match some other need. Adapter container Allows for access to the outside world without having to implement a service or ingress controller Ambassador container Alway, OnFailure or Never restartPolicy httpGet: # or exec or tcpSocket path: /healthz port: 8080 httpHeaders: - name: X-Custom-Header value: Awesome initialDelaySeconds: 15 timeoutSeconds: 1 livenessProbe or redinessProbe strategy: type: Recreate Terminate old pods before running new kind: PersistentVolume apiVersion: v1 metadata: name: 10gpv01 labels: type: local spec: capacity: storage: 10Gi accessModes: - ReadWriteOnce hostPath: path: "/somepath/data01" PersistentVolume kind: PersistentVolumeClaim apiVersion: v1 metadata: name: myclaim spec: accessModes: - ReadWriteOnce resources: requests: storage: 8Gi PersistentVolumeClaim
Document information
- Uploaded on
- February 1, 2024
- Number of pages
- 7
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers