|
| 1 | +--- |
| 2 | +title: Built-in controllers |
| 3 | +content_template: templates/concept |
| 4 | +weight: 10 |
| 5 | +--- |
| 6 | + |
| 7 | +{{% capture overview %}} |
| 8 | + |
| 9 | +This page lists the {{< glossary_tooltip text="controllers" term_id="controller" >}} |
| 10 | +that come as part of Kubernetes itself. |
| 11 | +{{% /capture %}} |
| 12 | + |
| 13 | + |
| 14 | +{{% capture body %}} |
| 15 | + |
| 16 | +Kubernetes comes with a number of built-in controllers that run as part |
| 17 | +of the {{< glossary_tooltip term_id="kube-controller-manager" >}}. |
| 18 | + |
| 19 | +If your cluster is deployed against a cloud service provider, you can |
| 20 | +use the cloud-controller-manager to run additional provider-specific |
| 21 | +controllers such as |
| 22 | +[Route](/docs/concepts/architecture/cloud-controller/#route-controller). |
| 23 | + |
| 24 | +The cloud controller manager provides an abstract API (in Go) that |
| 25 | +allows cloud vendors to plug in their custom implementation. |
| 26 | + |
| 27 | +The built-in {{< glossary_tooltip term_id="kube-scheduler" text="scheduler" >}} |
| 28 | +is itself a specialized controller. The scheduler's purpose is to reconcile the |
| 29 | +desired set of running Pods and match that against the available Nodes, |
| 30 | +optimizing against discovered constraints. |
| 31 | +{{< glossary_tooltip term_id="kubelet" >}} will update the actual state each |
| 32 | +time it starts or stops a scheduled Pod. |
| 33 | + |
| 34 | +Because its work is essential to Kubernetes' operation, the scheduler |
| 35 | +runs separately from the kube-controller-manager. This separation helps |
| 36 | +with control plane performance. |
| 37 | + |
| 38 | +The controllers that run inside kube-controller-manager are: |
| 39 | + |
| 40 | +## Controllers for running workloads on Kubernetes {#controllers-workloads} |
| 41 | + |
| 42 | +* [CronJob controller](/docs/reference/controllers/cronjob/) |
| 43 | +* [DaemonSet controller](/docs/reference/controllers/daemonset/) |
| 44 | +* [Deployment controller](/docs/reference/controllers/deployment/) |
| 45 | +* [Job controller](/docs/reference/controllers/job/) |
| 46 | +* [ReplicaSet controller](/docs/reference/controllers/replicaset/) |
| 47 | +* [StatefulSet controller](/docs/reference/controllers/statefulset/) |
| 48 | +* [Service controller](/docs/reference/controllers/service/) |
| 49 | + |
| 50 | +## Pod management controllers {#controllers-pod-management} |
| 51 | + |
| 52 | +* [Horizontal Pod Autoscaler](/docs/reference/controllers/horizontal-pod-autoscaler/) |
| 53 | +* [PodDisruptionBudget controller](/docs/reference/controllers/poddisruptionbudget/) |
| 54 | +* [PodPreset controller](/docs/reference/access-authn-authz/admission-controllers/#podpreset) |
| 55 | + |
| 56 | +## Resource management controllers {#controllers-resource-management} |
| 57 | + |
| 58 | +* [Resource quota controller](/reference/access-authn-authz/admission-controllers/#resourcequota) |
| 59 | + |
| 60 | +## Certificate controllers {#controllers-certificates} |
| 61 | + |
| 62 | +* [Root CA controller](/docs/reference/controllers/certificate-root-ca-publisher/) |
| 63 | + |
| 64 | +There are also a set of three controllers that work together to provide signed |
| 65 | +{{< glossary_tooltip text="certificates" term_id="certificate" >}} on demand, for use within your cluster: |
| 66 | + |
| 67 | +[Certificate signer](/docs/reference/controllers/certificate-signer) |
| 68 | +: A controller that signs certificates based on a certificate signing request (CSR), |
| 69 | + once approved. The issued certificates will have a signing chain back to the root CA. |
| 70 | + |
| 71 | +[Certificate signature approver](/docs/reference/controllers/certificate-approver/) |
| 72 | +: An automated approver for valid certificate signing requests. Requests are approved |
| 73 | + automatically if the request came from a Node known to Kubernetes. |
| 74 | + |
| 75 | +[CSR cleaner](/docs/reference/controllers/certificate-cleaner/) |
| 76 | +: The CSRs within your cluster have a lifetime. This controller removes CSRs that have |
| 77 | + expired without being approved. |
| 78 | + |
| 79 | +{{< note >}} |
| 80 | +If you wanted to have something that isn't a Node use a signing request to obtain valid |
| 81 | +cluster certificates, you can implement that in your own custom controller. |
| 82 | +The built-in controller will automatically know not to intervene, because it only acts |
| 83 | +on signing requests that come from nodes. |
| 84 | +{{< /note >}} |
| 85 | + |
| 86 | +## Storage controllers {#controllers-storage} |
| 87 | + |
| 88 | +There are a set of built-in controllers for storage management. |
| 89 | + |
| 90 | +* [Volume attach / detach controller](/docs/reference/controllers/volume-attach-detach/) |
| 91 | +* [PersistentVolume controller](/docs/reference/controllers/volume-persistentvolume/) |
| 92 | +* [PersistentVolumeClaim controller](/docs/reference/controllers/volume-persistentvolumeclaim/) |
| 93 | +* [PersistentVolumeClaim in-use protection controller](/docs/reference/controllers/volume-persistentvolumeclaim-protection/) |
| 94 | + |
| 95 | +## Networking controllers {#controllers-networking} |
| 96 | + |
| 97 | +* [Endpoint controller](/docs/reference/controllers/endpoint) |
| 98 | +* [Service controller](/docs/reference/controllers/service) |
| 99 | +* [Node IP address management controller](/docs/reference/controllers/node-ipam/) |
| 100 | + |
| 101 | +## Cluster orchestration controllers {#controllers-cluster-orchestration} |
| 102 | + |
| 103 | +* [ServiceAccount controller](/docs/reference/controllers/serviceaccount/) |
| 104 | +* [ServiceAccount token controller](/docs/reference/controllers/serviceaccount-token/) |
| 105 | +* [ClusterRole aggregation controller](/docs/reference/controllers/clusterrole-aggregation) |
| 106 | + |
| 107 | +## Garbage collection & expiry controllers {#controllers-gc-expiry} |
| 108 | + |
| 109 | +### Time-to-live (TTL) controller {#controller-ttl} |
| 110 | + |
| 111 | +The [TTL controller](/docs/reference/controllers/ttl/) sets TTL |
| 112 | +annotations on Nodes based on cluster size. |
| 113 | +kubelet consumes these annotations as a hint about how long it can cache |
| 114 | +object data that it has fetched from the |
| 115 | +{{< glossary_tooltip text="API server" term_id="kube-apiserver" >}}. |
| 116 | + |
| 117 | +### TTL-after-finished controller {#controller-ttl-after-finished} |
| 118 | + |
| 119 | +The [TTL-after-finished controller](/docs/reference/controllers/ttl-after-finished) |
| 120 | +cleans up finished task objects; currently, just Jobs. |
| 121 | + |
| 122 | +### Garbage collector {#controller-garbagecollector} |
| 123 | + |
| 124 | +The [garbage collector](/docs/reference/controllers/garbage-collector/) watches |
| 125 | +for changes to objects that have dependencies, and spots objects that are eligible |
| 126 | +for garbage collection. Once identified these are queued for (attempts at) deletion. |
| 127 | + |
| 128 | +Other controllers can rely on this behavior to take care of cascading deletion |
| 129 | +of objects via parent-child relationships. |
| 130 | + |
| 131 | +### Pod garbage collector {#controller-pod-garbage-collector} |
| 132 | + |
| 133 | +The [pod garbage collector](/docs/reference/controllers/pod-garbage-collector/) |
| 134 | +takes care of cleaning up {{< glossary_tooltip text="Pods" term_id="pod" >}} that |
| 135 | +are terminated, so that the resources for tracking those Pods can be reclaimed. |
| 136 | + |
| 137 | +### Certificate signing request cleaner {#controller-certificate-cleaner} |
| 138 | + |
| 139 | +The [CSR cleaner](/docs/reference/controllers/certificate-cleaner/) |
| 140 | +removes old certificate signing requests that haven't been approved and signed. |
| 141 | + |
| 142 | +### Node lifecycle controller {#controller-node-lifecycle} |
| 143 | + |
| 144 | +The [node lifecycle controller](/docs/reference/controllers/node-lifecycle) |
| 145 | +observes the behavior of kubelet on a node, and sets (potentially also removes) |
| 146 | +{{< glossary_tooltip text="taints" term_id="taint" >}} on Nodes that reflect its |
| 147 | +findings. |
| 148 | + |
| 149 | +### Namespace lifecycle controller {#controller-namespace} |
| 150 | + |
| 151 | +When you (or any Kubernetes API client) remove a {{< glossary_tooltip term_id="namespace" >}}, |
| 152 | +the [namespace controller](/docs/reference/controllers/namespace/) makes sure that objects in |
| 153 | +that namespace are removed before the namespace itself is removed. |
| 154 | + |
| 155 | +{{% /capture %}} |
0 commit comments