YAML Flashcards
CKA cert in 26 days
REQUIRED FIELDS IN AYML
apiVersion
kind
metadata
spec: can leave out, when creating namespaces
kind
what type of object you want to create
metadata
data that helps uniquely identify the object
METADATA
metadata.name
used to assign a name to the object
METADATA
metadata.labels
- organise your resources
- helps you filter your resources
spec
API specifies what structure/content this section should hold
how to separate objects in a YAML file
’—’
RANDOM*
get short version info of kubernetes client and server version
kubectl –version short
view API REFERENCE DATA
kubectl explain pod
RANDOM
POD IS A :
COLLECTION OF CONTAINERS THAT CAN RUN ON A HOST. IT IS CRATED BY CLIENTS AND SCHEDULED ONTO HOSTS
HIGH LEVEL OVERVIEW OF THE ENTIRE YAML STRUCTURE
kubectl explain pod –recursive | less
regenerate yaml descriptor from the existing pod
kubectl get pod pod-httpd -o yaml > regenerated-descriptor.yaml