Set 1 Flashcards
Shorthand to create a service for a resource
kubectl expose
Flag to set name in kubectl expose
–name
Flag to set port in kubectl expose
–port
Flag to set target-port in kubectl expose
–target-port
Which flag is used to create a configMap from file
–from-file
which flag is likely used when using shorthand for a secret
–from-literal
Grep flag for 5 lines before match
-B 5
Grep flag for 8 lines after match
-A 8
Build image with a tag for registry.killer.sh:5000/sun-cipher
Docker build -t registry.killer.sh:5000/sun-cipher:TAGVALUE
podman build -t registry.killer.sh:5000/sun-cipher:TAGVALUE
What are the 3 recommended exam start procedures
- alias k=kubectl
- export do=”–dry-run=client -o yaml”
- export now=”–force –grace-period 0”
Navigate to container spec for a deployment and what else would occur in these levels?
root (metadata) -> spec (replicas) -> template (metadata) -> pod spec (volumes) -> containers (volumeMounts)
spec.template.spec.containers
Build a temp pod to run a command
kubectl run tmp –restart=Never –rm –image=nginx:alpine -i – <command></command>
Explain the steps required to build a functional persistent volume
build the following: PersistentVolume, PersistentVolumeClaim, Pod
pod.yaml:
fill spec.volumes:
- name
- persistentVolumeClaim: with claimName
fill spec.containers.volumeMounts:
- mountPath
- name
Where do you control PVC access control?
PV.yaml:
metadata.annotations:
spec to make job execute 3 times
spec.completions: 3