# What runs on your machines

What {{product}} runs in and for a cluster, how the control plane and nodes are watched and repaired, and which firewalls surround them.

## The control plane

The control-plane machines run the API server, etcd (stacked: one member per machine), the
scheduler and the controller manager. They are Deutsche Cloud's and are not nodes of your cluster.
Each runs Deutsche Cloud's agent every 20 seconds: it reports health and carries out what Deutsche Cloud
asks (bootstrap tokens, access-entry RBAC, drains, snapshots, add-ons). `dcloud eks clusters get`
lists each machine with its status, minor, last report and whether its agent runs the current files.

Secrets in etcd are encrypted with KMS v2. Pod Security `baseline` is enforced, `restricted`
warned and audited.

## What Deutsche Cloud runs in every cluster

The **Add-ons** tab lists these with their versions. `dcloud eks addons list` returns five of them
with `system: true`: `cilium`, `coredns`, `konnectivity-agent`, `ews-cloud-controller-manager` and
`ews-csi-driver`. They are upgraded with Kubernetes, and objects Deutsche Cloud applies are put back if
they are changed in the cluster.

| Component                | Runs on                                      | Role                                                                  |
| ------------------------ | -------------------------------------------- | --------------------------------------------------------------------- |
| Cilium                   | every node                                   | Pod network, Services in place of kube-proxy, NetworkPolicy           |
| CoreDNS                  | nodes                                        | Cluster DNS                                                           |
| Konnectivity             | every node, dialing out to the control plane | Lets the API server reach kubelets without inbound ports on nodes     |
| Cloud controller manager | control plane                                | Node addresses and lifecycle; LoadBalancer Services as load balancers |
| CSI driver               | control plane and every node                 | PersistentVolumes on Deutsche Cloud volumes                              |
| ECR credential provider  | every node (kubelet plugin)                  | Image pulls from your registry with the node group's IAM role         |
| containerd and runc      | every node                                   | Container runtime                                                     |

## Watching and repair

- **A node** NotReady for ten minutes is drained and replaced, one node per node group at a time.
  A node that does not join within 20 minutes is replaced; after three failed nodes the group stops
  (`failed`).
- **A control-plane machine** of a `standard` cluster that has not reported for ten minutes, while
  the others still report, is taken out of etcd and replaced by a new machine. The API keeps
  answering on the other two.
- **The control-plane machine of a `dev` cluster** is restarted, not replaced, because it holds the
  only copy of the cluster's state on a machine. Its etcd snapshots are the copy off it; use
  `standard` for anything that must survive a lost machine without an outage.

Drains for scale-downs and repairs respect PodDisruptionBudgets for up to five minutes per node;
then the node goes anyway. Every step is in **Activity**.

## Firewalls

Each cluster has two security groups, shown on its **Networking** tab and under Compute:

| Group                         | Rules                                                                                                                                                        |
| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `eks-<cluster>-nodes`         | No inbound rule at first: nothing reaches a node from the internet, SSH included. Yours to extend, for example TCP 30000–32767 from an office for NodePorts. |
| `eks-<cluster>-control-plane` | The control-plane machines' rules. Read-only: they follow from the endpoint access setting.                                                                  |

Pods, Services and load-balancer health checks use the network, which is not filtered.
Deutsche Cloud's on-call staff keep an SSH path to nodes (port 22 from Deutsche Cloud's control plane only)
through a firewall of their own that is not one of your groups; each use is in your audit log as
`operator:IssueSshCertificate`.

## Related

- [Clusters and node groups](clusters-and-node-groups.md)
- [Security](security.md)
