Kubernetes controllers configuration

A Calico Kubernetes controllers configuration resource (KubeControllersConfiguration) represents configuration options for the Calico Kubernetes controllers.

Sample YAML

  1. apiVersion: projectcalico.org/v3
  2. kind: KubeControllersConfiguration
  3. metadata:
  4. name: default
  5. spec:
  6. logSeverityScreen: Info
  7. healthChecks: Enabled
  8. etcdv3CompactionPeriod: 10m
  9. prometheusMetricsPort: 9094
  10. controllers:
  11. node:
  12. reconcilerPeriod: 5m
  13. leakGracePeriod: 15m
  14. syncLabels: Enabled
  15. hostEndpoint:
  16. autoCreate: Disabled
  17. policy:
  18. reconcilerPeriod: 5m
  19. workloadEndpoint:
  20. reconcilerPeriod: 5m
  21. serviceAccount:
  22. reconcilerPeriod: 5m
  23. namespace:
  24. reconcilerPeriod: 5m

Kubernetes controllers configuration definition

Metadata

FieldDescriptionAccepted ValuesSchema
nameUnique name to describe this resource instance. Required.Must be defaultstring
  • Calico automatically creates a resource named default containing the configuration settings, only the name default is used and only one object of this type is allowed. You can use calicoctl to view and edit these settings

Spec

FieldDescriptionAccepted ValuesSchemaDefault
logSeverityScreenThe log severity above which logs are sent to the stdout.Debug, Info, Warning, Error, FatalstringInfo
healthChecksEnable support for health checksEnabled, DisabledstringEnabled
prometheusMetricsPortPort on which to serve prometheus metrics.Set to 0 to disable, > 0 to enable.TCP port9094
etcdv3CompactionPeriodThe period between etcdv3 compaction requests. Only applies when using etcd as the Calico datastore.Set to 0 to disable, > 0 to enableDuration string10m
controllersEnabled controllers and their settingsControllers

Controllers

FieldDescriptionSchema
nodeEnable and configure the node controlleromit to disable, or NodeController
policyEnable and configure the network policy controlleromit to disable, or PolicyController
workloadEndpointEnable and configure the workload endpoint controlleromit to disable, or WorkloadEndpointController
serviceAccoutEnable and configure the service account controlleromit to disable, or ServiceAccountController
namespaceEnable and configure the namespace controlleromit to disable, or NamespaceController

NodeController

The node controller automatically cleans up configuration for nodes that no longer exist. Optionally, it can create host endpoints for all Kubernetes nodes.

FieldDescriptionAccepted ValuesSchemaDefault
reconcilerPeriodPeriod to perform reconciliation with the Calico datastoreDuration string5m
syncLabelsWhen enabled, Kubernetes node labels will be copied to Calico node objects.Enabled, DisabledstringEnabled
hostEndpointControls allocation of host endpointsHostEndpoint
leakGracePeriodGrace period to use when garbage collecting suspected leaked IP addresses.Duration string15m

HostEndpoint

FieldDescriptionAccepted ValuesSchemaDefault
autoCreateWhen enabled, automatically create a host endpoint for each nodeEnabled, DisabledstringDisabled

PolicyController

The policy controller syncs Kubernetes network policies to the Calico datastore. This controller is only valid when using etcd as the Calico datastore.

FieldDescriptionSchemaDefault
reconcilerPeriodPeriod to perform reconciliation with the Calico datastoreDuration string5m

WorkloadEndpointController

The workload endpoint controller automatically syncs Kubernetes pod label changes to the Calico datastore by updating the corresponding workload endpoints appropriately. This controller is only valid when using etcd as the Calico datastore.

FieldDescriptionSchemaDefault
reconcilerPeriodPeriod to perform reconciliation with the Calico datastoreDuration string5m

ServiceAccountController

The service account controller syncs Kubernetes service account changes to the Calico datastore. This controller is only valid when using etcd as the Calico datastore.

FieldDescriptionSchemaDefault
reconcilerPeriodPeriod to perform reconciliation with the Calico datastoreDuration string5m

NamespaceController

The namespace controller syncs Kubernetes namespace label changes to the Calico datastore. This controller is only valid when using etcd as the Calico datastore.

FieldDescriptionSchemaDefault
reconcilerPeriodPeriod to perform reconciliation with the Calico datastoreDuration string5m

Supported operations

Datastore typeCreateDelete (Global default)UpdateGet/ListNotes
etcdv3YesYesYesYes
Kubernetes API serverYesYesYesYes