2024/2025
Kubernetes API primitives - ANSWERSPod
Node
Service
ServiceAccount
...
Kubernetes Objects
Kubernetes Objects - ANSWERSData object that represent the state of the cluster
Get Kubernetes objects - ANSWERSkubectl api-resources -o name
Basic properties of a Kubernetes object - ANSWERSSpec
Status
Kubernetes Object - Spec - ANSWERSThe desired stae of the object
Kubernetes Object - Status - ANSWERSThe current state of the objects
Pods - ANSWERSBasic building block of any application running in Kubernetes
Building blocks of a Pod - ANSWERSOne or more containers
Resources shared by the containers
Namespaces - ANSWERSA way to organise objects within the a cluster together. If none is specified, the
default one will be used
, Containers - Commands - ANSWERSWill be used to run a command in the container. Will override the
default command specified by the container:
command: ['echo']
Containters - Commands - Arguments - ANSWERSAdditional arguments feed to the command
args: ['this is a customer argument']
Containers - Port - ANSWERSExposing a port to the rest of the cluster from the yaml
ports:
- containerPort: 80
ConfigMaps - ANSWERSKubernetes object for storing configuration data in a key-value format
Environment variable - ANSWERSenv:
- name: MY_VAR
valueFrom:
configMapKeyRef:
name: my-config-map
key: myKey
Labels - ANSWERSKey-value pairs that can be attached to a kubernetes objects to help identify the object
metadata:
labels:
app: appname