Kubernetes
Kubernetes is a container orchestration engine
Basic terminology
- node: A single VM or physical machine running kubernetes. There can be master nodes and worker nodes
- pods: smallest deployable unit in a cluster. can consist of multiple containers
- replica set: gurantees a number of pods are up at any given time
- deployments: defines a desired state of pods. uses replication controllers
- services: rules to expose a deployment. provides virtual network addresses
- volumes: provides persistency and file sharing between pods
- namespace: a way to split a cluster into seperate virtual clusters
Useful commands
get x -o wide[ get more info , eg for pods show its ip]create x -o yaml --dry-run > file.yml, edit and apply backhelm inspect values stable/nnextcloud > values.ymlgets the values filehelm install my_name -f values.ymlto specify the values fileservice: type NodePortto use in ingress controllerpersistentvolumeclaimsto create claims, which can be fullfilled by the providerport-forward <resource> locport:remoteportkubectl edit <resource>: easy editing deploymentskubectl exec -it bash: interactive terminalkubectl explain <resource> [ --recursive ]: short documentation on resourcekubectl get resourcequota: get limits for each resource
Kubernetes Resources
- Examples for writing yamls