Resources to learn Kubernetes
- Online Course by the Linux Foundation: Introduction to Kubernetes. swi recommended to start your journey!
- CKAD exercises: exercises for the CKAD certification. Also useful as cheat sheet.
- Official kubernetes documentation (start-your-journey-approved by cle)
- Kubernetes Security Talk
- Certified Kubernetes Administrator (CKA) Preparation Guide - Curriculum V1.14
- Talks about Kubernetes by media.ccc.de
- More talks about Kubernetes by FOSDEM
- k3s: single binary kubernetes with containerd and kubectl included. Supports multi-node clusters.
❤️ swi's favourite ❤️ - microk8s: all-in-one install, requires snapd. Supports multi-node clusters.
No lab setup at home?
- GKE: You start with $300 worth of credits for free🎉
Kubectl has a built in help for every possible field in your manifest similar to man
.
$ kubectl explain cronjob.spec.jobTemplate.spec
KIND: CronJob
VERSION: batch/v1beta1
RESOURCE: spec <Object>
DESCRIPTION:
Specification of the desired behavior of the job. More info:
[...]
FIELDS:
activeDeadlineSeconds <integer>
Specifies the duration in seconds relative to the startTime that the job
[...]
The access modes (ReadWriteOnce
, ReadOnlyMany
, and ReadWriteMany
) are about the nodes, not the pods. A ReadWriteOnce
volume can still be read-write mounted by many pods, but only by pods on the same node.
OR: If starting my (Perl) app in a container CTRL-C
does no longer work.
Docker creates a new PID namespace for each container. The first process in the container has the process id 1.
Note: A process running as PID 1 inside a container is treated specially by Linux: it ignores any signal with the default action. So, the process will not terminate on SIGINT or SIGTERM unless it is coded to do so.
A good cross-platform solution is running a tiny init system in front of the app. See Solve Signal Handling in Perl Containers with tini
.