Kubernetes Certified Application Developer -
Questions with Verified Answers
What does CKAD stand for?
Certified Kubernetes Application Developer
Create an nginx pod from cli
k run nginx --image=nginx
Create a redis pod yaml file from cli
k run redis --image=redis --dry-run=client -o yaml > pod.yaml
Docker start image?
Docker run imagename
Docker list running containers?
Docker ps
Docker list running and stopped containers?
Docker ps -a
What are 3 ways to add environment variables?
Plain key value, ConfigMap and Secrets
To get an env var from a configMap?
env:
- name: APP_COLOR
valueFrom:
configMapKeyRef:
To get an env var from a secrets?
, env:
- name: APP_COLOR
valueFrom:
secretKeyRef:
What are configMaps used for?
To pass configuration data via key value pairs
Create a configMap from the command line?
k create configMap name --from-literal=APP_COLOR=blue
4 main fields of a configMap
apiVersion
kind
metadata
data
Add configMap to file?
container:
envFrom:
- configMapRef:
name: app-config
Create definition file from a running pod?
kubectl get pod pod-name -o yaml > pod.yaml
kubectl abbreviation for configmap?
cm
Get help on using envFrom from command line?
k explain pods --recursive | grep envFrom
Questions with Verified Answers
What does CKAD stand for?
Certified Kubernetes Application Developer
Create an nginx pod from cli
k run nginx --image=nginx
Create a redis pod yaml file from cli
k run redis --image=redis --dry-run=client -o yaml > pod.yaml
Docker start image?
Docker run imagename
Docker list running containers?
Docker ps
Docker list running and stopped containers?
Docker ps -a
What are 3 ways to add environment variables?
Plain key value, ConfigMap and Secrets
To get an env var from a configMap?
env:
- name: APP_COLOR
valueFrom:
configMapKeyRef:
To get an env var from a secrets?
, env:
- name: APP_COLOR
valueFrom:
secretKeyRef:
What are configMaps used for?
To pass configuration data via key value pairs
Create a configMap from the command line?
k create configMap name --from-literal=APP_COLOR=blue
4 main fields of a configMap
apiVersion
kind
metadata
data
Add configMap to file?
container:
envFrom:
- configMapRef:
name: app-config
Create definition file from a running pod?
kubectl get pod pod-name -o yaml > pod.yaml
kubectl abbreviation for configmap?
cm
Get help on using envFrom from command line?
k explain pods --recursive | grep envFrom