

CKAD Exercises
0.12MB. 0 audio & 0 images. Updated 2023-05-27.
The author has shared 11 other
item(s).
Description
Sample (from 132 notes)
Cards are customizable!
When this deck is imported into the desktop program, cards will appear
as
the deck author has made them. If you'd like to customize what appears
on
the front and back of a card, you can do so by clicking the Edit
button, and
then clicking the Cards button.
Front | Create a new serviceaccount called 'myuser' |
Back | $> kubectl create sa myuserAlternatively:# let's get a template easily$> kubectl get sa default -o yaml > sa.yaml$> vim sa.yaml---apiVersion: v1kind: ServiceAccountmetadata: name: myuser---$> kubectl create -f sa.yaml |
Front | Create a configmap named config with values foo=lala,foo2=lolo |
Back | $> kubectl create configmap config --from-literal=foo=lala --from-literal=foo2=lolo |
Front | Create a Pod with two containers, both with image busybox and command "echo hello; sleep 3600". Connect to the second container and run 'ls' |
Back | Easiest way to do it is create a pod with a single container and save its definition in a YAML file:$> kubectl run busybox --image=busybox --restart=Never -o yaml --dry-run=client -- /bin/sh -c 'echo hello;sleep 3600' > pod.yaml vi pod.yamlCopy/paste the container related values, so your final YAML should contain the following two containers (make sure those containers have a different name):---containers: - args: - /bin/sh - -c - echo hello;sleep 3600 image: busybox imagePullPolicy: IfNotPresent name: busybox resources: {} - args: - /bin/sh - -c - echo hello;sleep 3600 image: busybox name: busybox2---$> kubectl create -f pod.yaml# Connect to the busybox2 container within the pod$> kubectl exec -it busybox -c busybox2 -- /bin/sh$> ls$> exit# or you can do the above with just an one-liner$> kubectl exec -it busybox -c busybox2 -- ls# you can do some cleanup$> kubectl delete po busybox |
After the file is downloaded, double-click on it to open it in the desktop program.
At this time, it is not possible to add shared decks directly to your AnkiWeb account - they need to be added from the desktop then synchronized to AnkiWeb.
Reviews

This is the latest from https://github.com/dgkanatsios/CKAD-exercises