2nd practice test for CKA exam preparation. First is at CKA exam practice test 1
- Display all the pods sorted by start time
- Create a pod that uses secrets
- Create a secret
- Pull secrets from environment variables
- Pull secrets from a volume
- Dump the secrets out via kubectl to show it worked
- Create a job that runs every 3 minutes and prints out the current time.
- Create a job that runs 20 times, 5 containers at a time, and prints “Hello parallel world”
- Create a horizontal autoscaling group that starts with 2 pods and scales when CPU usage is over 50%.
- Create a custom resource definition - CRD
- Display it in the API with curl
- Create a networking policy such that only pods with the label access=granted can talk to it.
- Create a nginx pod and attach this policy to it.
- Create a busybox pod and attempt to talk to nginx - should be blocked
- Attach the label to busybox and try again - should be allowed
- Create a service that references an externalname.
- Test that this works from another pod
- Create a pod that runs all processes as user 1000.
- Create a namespace
- Run a pod in the new namespace
- Put memory limits on the namespace
- Limit pods to 2 persistent volumes in this namespace
- Write an ingress rule that redirects calls to /foo to one service and to /bar to another
- Write a service that exposes nginx on a nodeport
- Change it to use a cluster port
- Scale the service
- Change it to use an external IP
- Change it to use a load balancer
- Deploy nginx with 3 replicas and then expose a port
- Use port forwarding to talk to a specific port
- Make an API call using CURL and proper certs
- Join a new node to cluster
- Rotate certificates
- Taint a node and un-taint it
- Restart kubelet
- Configure the cluster to use 8.8.8.8 and 8.8.4.4 as upstream DNS servers.
- Create a pod with nginx and place a file using an init container that creates a simple index.html file with content - “created by init container”
- You have a Container with a volume mount. Add an init container that creates an empty file in the volume. (the only trick is to mount the volume to 1. init-container as well)
- Backup an etcd cluster
- List the members of an etcd cluster
- Find the health of etcd
Feel free to add any questions in the comment section that you have created or have found in the wild.