CKAD Exam - kimschles/schlesinger-knowledge GitHub Wiki
CKAD Prep
Concepts on the Exam
- Core Concepts - 13%
- API Primitives
- Create and Configure Basic Pods
- Configuration - 18%
- Understand ConfigMaps
- Understand SecurityContexts
- Define App Resource Requirements
- Create and Consume Secrets
- Understand Service Accounts
- Multi-Container Pods - 10%
- Design Patterns: Ambassador, Adapter, Sidecar
- - Sidecar Pattern
- - Init Containers
- Design Patterns: Ambassador, Adapter, Sidecar
- Pod Design - 20%
- Using Labels, Selectors, and Annotations
- Understand Deployments and Rolling Updates
- Understand Deployment Rollbacks
- Understand Jobs and CronJobs
- - State Persistence - 8%
- - Understand PVCs for Storage
- Observability - 18%
- Liveness and Readiness Probes
- Understand Container Logging
- Understand Monitoring Application in Kubernetes
- Understand Debugging in Kubernetes
- Services and Networking - 13%
- Understand Services
- Basic Network Policies
Exam Tips from Daniel
- 19 questions
- Questions are weighted differently
- Be strategic about which questions you answer
- The terminal is kinda crappy
- use set-context
- investigate crashing pods
- pipe text and logs to a specific file path
- Copy and paste the file paths that you are asked to send a file to
- Side car with a shared value
- Use the
--dry-run
kubectl run nginx --image-nginx
--restart=Never
makes a pod- ^^ without that makes a deployment
Exam Feburary 2019, first attempt
- Figure out how to use
edit
- It wouldn't work with vim's
:wq
- It wouldn't work with vim's
- Memorize multi-container pods with logging
- Memorize env variable syntax
- Volume mounts
Run
The kubectl run
command lets you quickly create a K8s deployment,pod, job or cronjob.
$ kubectl run hazelcast --image=hazelcast => deployment
$ kubectl run hazelcast --image=hazelcast --restart=Never => pod
$ kubectl run busybox --image=busybox --restart=OnFailure => job
$ kubectl run busybox --image=busybox --schedule="* * * * *" --restart=OnFailure => cronJob
kubectl create vs. apply
- Create a basic bod and service
- Create a multi-continaer pod
- Create a simple deployment
- Deploy a simple python app
- Increase the number of replicas to 6
Basic Pod and NodePort Service
kind: Pod
metadata:
name: basicpod
labels:
type: webserver
spec:
containers:
- name: webcont
image: nginx
ports:
- containerPort: 80```
```apiVersion: v1
kind: Service
metadata:
name: basicservice
spec:
selector:
type: webserver
type: NodePort
ports:
- protocol: TCP
port: 80```
### Basic Pod with Fluentd Sidecar
```apiVersion: v1
kind: Pod
metadata:
name: basicpod
labels:
type: webserver
spec:
containers:
- name: webcont
image: nginx
ports:
- containerPort: 80
- name: fdlogger
image: k8s.gcr.io/fluentd-gcp:1.30```