Lesson W1.1 decided: The Kladde stays on Container Apps. This course builds it on Kubernetes anyway, so that you know what happens underneath, and so that the decision rests on knowledge. In this lesson the manifests of the Kladde come into being, files under k8s/ on which all following lessons build: a namespace kladde, two deployments (kladde-web and kladde-worker), a service, a ConfigMap, probes and limits.

You need no Azure cluster for this and not a cent. A local cluster is enough: Kubernetes in Docker Desktop or another local cluster that kubectl can reach. First check whether you have one:

PowerShell
kubectl config get-contexts
kubectl get nodes

If get nodes shows a node with the status Ready, you are ready. If kubectl instead reports that the connection is refused, no cluster is running: Turn on Kubernetes in Docker Desktop under settings. Whoever has no local cluster reads the lesson and does the exercises in W1.3 on AKS; the commands are the same.

Containers and images you know from K1 and 3.1; how the Kladde runs in them (user 1654, port 8080, /health/live and /health/ready) is in 3.0.1 and 3.5.5. A word about the database: W1 tests the way to the cluster, not the data. In the exercises the web app runs as in K2 with its storage in memory.

Cluster, node, namespace

A cluster is the control plane with its nodes (W1.1). kubectl is the tool that talks to the cluster's API, and it knows from the kubeconfig file which cluster it talks to. A context is an entry in it: cluster, user and namespace. kubectl config get-contexts lists them, and an asterisk marks the current one. Remember this line: Most accidents with kubectl happen in the wrong context.

A namespace divides the cluster logically. Names are unique within a namespace, not across the cluster. According to the documentation, these namespaces exist in every AKS cluster:

Namespace What for
default for getting started right away without a namespace of your own
kube-system Kubernetes itself, such as coredns; don't put your own applications in it
kube-public rarely used; visible to every user in the cluster
kube-node-lease nodes use it to tell the control plane that they are alive

The Kladde gets a namespace of its own: Permissions, limits and cleanup then apply to everything in it, and kubectl delete namespace kladde removes the application completely.