kube-controller-managerSynopsisThe Kubernetes controller manager is a daemon that embeds the core control loops shipped with Kubernetes. In applications of robotics and automation, a control loop is a non-terminating loop that regulates the state of the system. In Kubernetes, a controller is a control loop that watches the shared state of the cluster through the apiserver and makes changes attempting to move the current state towards the desired state. Examples of controllers that ship with Kubernetes today are the replication controller, endpoints controller, namespace controller, and serviceaccounts controller.kube-controller-manager [flags] Options--allocate-node-cidrsShould CIDRs for Pods be allocated and set on the cloud provider. Requires --cluster-cidr.--allow-metric-labels stringToString Default: []The map from metric-label to value allow-list of this label. The key's format is <MetricName>,<LabelName>. The value's format is <allowed_value>,<allowed_value>...e.g. metric1,label1='v1,v2,v3', metric1,label2='v1,v2,v3' metric2,label1='v1,v2,v3'.--allow-metric-labels-manifest stringThe path to the manifest file that contains the allow-list mapping. The format of the file is the same as the flag --allow-metric-labels. Note that the flag --allow-metric-labels will override the manifest file.--attach-detach-reconcile-sync-period duration Default: 1m0sThe reconciler sync wait time between volume attach detach. This duration must be larger than one second, and increasing this value from the default may allow for volumes to be mismatched with pods.--authentication-kubeconfig stringkubeconfig file pointing at the 'core' kubernetes server with enough rights to create tokenreviews.authentication.k8s.io. This is optional. If empty, all token requests are considered to be anonymous and no client CA is looked up in the cluster.--authentication-skip-lookupIf false, the authentication-kubeconfig will be used to lookup missing authentication configuration from the cluster.--authentication-token-webhook-cache-ttl duration Default: 10sThe duration to cache responses from the webhook token authenticator.--authentication-tolerate-lookup-failureIf true, failures to look up missing authentication configuration from the cluster are not considered fatal. Note that this can result in authentication that treats all requests as anonymous.--authorization-always-allow-paths strings Default: "/healthz,/readyz,/livez"A list of HTTP paths to skip during authorization, i.e. these are authorized without contacting the 'core' kubernetes server.--authorization-kubeconfig stringkubeconfig file pointing at the 'core' kubernetes server with enough rights to create subjectaccessreviews.authorization.k8s.io. This is optional. If empty, all requests not skipped by authorization are forbidden.--authorization-webhook-cache-authorized-ttl duration Default: 10sThe duration to cache 'authorized' responses from the webhook authorizer.--authorization-webhook-cache-unauthorized-ttl duration Default: 10sThe duration to cache 'unauthorized' responses from the webhook authorizer.--bind-address string Default: 0.0.0.0The IP address on which to listen for the --secure-port port. The associated interface(s) must be reachable by the rest of the cluster, and by CLI/web clients. If blank or an unspecified address (0.0.0.0 or ::), all interfaces and IP address families will be used.--cert-dir stringThe directory where the TLS certs are located. If --tls-cert-file and --tls-private-key-file are provided, this flag will be ignored.--cidr-allocator-type string Default: "RangeAllocator"Type of CIDR allocator to use--client-ca-file stringIf set, any request presenting a client certificate signed by one of the authorities in the client-ca-file is authenticated with an identity corresponding to the CommonName of the client certificate.--cloud-config stringThe path to the cloud provider configuration file. Empty string for no configuration file.--cloud-provider stringThe provider for cloud services. Empty string for no provider.--cluster-cidr stringCIDR Range for Pods in cluster. Only used when --allocate-node-cidrs=true; if false, this option will be ignored.--cluster-name string Default: "kubernetes"The instance prefix for the cluster.--cluster-signing-cert-file stringFilename containing a PEM-encoded X509 CA certificate used to issue cluster-scoped certificates. If specified, no more specific --cluster-signing-* flag may be specified.--cluster-signing-duration duration Default: 8760h0m0sThe max length of duration signed certificates will be given. Individual CSRs may request shorter certs by setting spec.expirationSeconds.--cluster-signing-key-file stringFilename containing a PEM-encoded RSA or ECDSA private key used to sign cluster-scoped certificates. If specified, no more specific --cluster-signing-* flag may be specified.--cluster-signing-kube-apiserver-client-cert-file stringFilename containing a PEM-encoded X509 CA certificate used to issue certificates for the kubernetes.io/kube-apiserver-client signer. If specified, --cluster-signing-{cert,key}-file must not be set.--cluster-signing-kube-apiserver-client-key-file stringFilename containing a PEM-encoded RSA or ECDSA private key used to sign certificates for the kubernetes.io/kube-apiserver-client signer. If specified, --cluster-signing-{cert,key}-file must not be set.--cluster-signing-kubelet-client-cert-file stringFilename containing a PEM-encoded X509 CA certificate used to issue certificates for the kubernetes.io/kube-apiserver-client-kubelet signer. If specified, --cluster-signing-{cert,key}-file must not be set.--cluster-signing-kubelet-client-key-file stringFilename containing a PEM-encoded RSA or ECDSA private key used to sign certificates for the kubernetes.io/kube-apiserver-client-kubelet signer. If specified, --cluster-signing-{cert,key}-file must not be set.--cluster-signing-kubelet-serving-cert-file stringFilename containing a PEM-encoded X509 CA certificate used to issue certificates for the kubernetes.io/kubelet-serving signer. If specified, --cluster-signing-{cert,key}-file must not be set.--cluster-signing-kubelet-serving-key-file stringFilename containing a PEM-encoded RSA or ECDSA private key used to sign certificates for the kubernetes.io/kubelet-serving signer. If specified, --cluster-signing-{cert,key}-file must not be set.--cluster-signing-legacy-unknown-cert-file stringFilename containing a PEM-encoded X509 CA certificate used to issue certificates for the kubernetes.io/legacy-unknown signer. If specified, --cluster-signing-{cert,key}-file must not be set.--cluster-signing-legacy-unknown-key-file stringFilename containing a PEM-encoded RSA or ECDSA private key used to sign certificates for the kubernetes.io/legacy-unknown signer. If specified, --cluster-signing-{cert,key}-file must not be set.--concurrent-cron-job-syncs int32 Default: 5The number of cron job objects that are allowed to sync concurrently. Larger number = more responsive jobs, but more CPU (and network) load--concurrent-daemonset-syncs int32 Default: 2The number of daemonset objects that are allowed to sync concurrently. Larger number = more responsive daemonsets, but more CPU (and network) load--concurrent-deployment-syncs int32 Default: 5The number of deployment objects that are allowed to sync concurrently. Larger number = more responsive deployments, but more CPU (and network) load--concurrent-endpoint-syncs int32 Default: 5The number of endpoint syncing operations that will be done concurrently. Larger number = faster endpoint updating, but more CPU (and network) load--concurrent-ephemeralvolume-syncs int32 Default: 5The number of ephemeral volume syncing operations that will be done concurrently. Larger number = faster ephemeral volume updating, but more CPU (and network) load--concurrent-gc-syncs int32 Default: 20The number of garbage collector workers that are allowed to sync concurrently.--concurrent-horizontal-pod-autoscaler-syncs int32 Default: 5The number of horizontal pod autoscaler objects that are allowed to sync concurrently. Larger number = more responsive horizontal pod autoscaler objects processing, but more CPU (and network) load.--concurrent-job-syncs int32 Default: 5The number of job objects that are allowed to sync concurrently. Larger number = more responsive jobs, but more CPU (and network) load--concurrent-namespace-syncs int32 Default: 10The number of namespace objects that are allowed to sync concurrently. Larger number = more responsive namespace termination, but more CPU (and network) load--concurrent-rc-syncs int32 Default: 5The number of replication controllers that are allowed to sync concurrently. Larger number = more responsive replica management, but more CPU (and network) load--concurrent-replicaset-syncs int32 Default: 5The number of replica sets that are allowed to sync concurrently. Larger number = more responsive replica management, but more CPU (and network) load--concurrent-resource-quota-syncs int32 Default: 5The number of resource quotas that are allowed to sync concurrently. Larger number = more responsive quota management, but more CPU (and network) load--concurrent-service-endpoint-syncs int32 Default: 5The number of service endpoint syncing operations that will be done concurrently. Larger number = faster endpoint slice updating, but more CPU (and network) load. Defaults to 5.--concurrent-service-syncs int32 Default: 1The number of services that are allowed to sync concurrently. Larger number = more responsive service management, but more CPU (and network) load--concurrent-serviceaccount-token-syncs int32 Default: 5The number of service account token objects that are allowed to sync concurrently. Larger number = more responsive token generation, but more CPU (and network) load--concurrent-statefulset-syncs int32 Default: 5The number of statefulset objects that are allowed to sync concurrently. Larger number = more responsive statefulsets, but more CPU (and network) load--concurrent-ttl-after-finished-syncs int32 Default: 5The number of ttl-after-finished-controller workers that are allowed to sync concurrently.--concurrent-validating-admission-policy-status-syncs int32 Default: 5The number of ValidatingAdmissionPolicyStatusController workers that are allowed to sync concurrently.--configure-cloud-routes Default: trueShould CIDRs allocated by allocate-node-cidrs be configured on the cloud provider.--contention-profilingEnable block profiling, if profiling is enabled--controller-start-interval durationInterval between starting controller managers.--controllers strings Default: "*"A list of controllers to enable. '*' enables all on-by-default controllers, 'foo' enables the controller named 'foo', '-foo' disables the controller named 'foo'.All controllers: bootstrap-signer-controller, certificatesigningrequest-approving-controller, certificatesigningrequest-cleaner-controller, certificatesigningrequest-signing-controller, cloud-node-lifecycle-controller, clusterrole-aggregation-controller, cronjob-controller, daemonset-controller, deployment-controller, device-taint-eviction-controller, disruption-controller, endpoints-controller, endpointslice-controller, endpointslice-mirroring-controller, ephemeral-volume-controller, garbage-collector-controller, horizontal-pod-autoscaler-controller, job-controller, kube-apiserver-serving-clustertrustbundle-publisher-controller, legacy-serviceaccount-token-cleaner-controller, namespace-controller, node-ipam-controller, node-lifecycle-controller, node-route-controller, persistentvolume-attach-detach-controller, persistentvolume-binder-controller, persistentvolume-expander-controller, persistentvolume-protection-controller, persistentvolumeclaim-protection-controller, pod-garbage-collector-controller, replicaset-controller, replicationcontroller-controller, resourceclaim-controller, resourcequota-controller, root-ca-certificate-publisher-controller, selinux-warning-controller, service-cidr-controller, service-lb-controller, serviceaccount-controller, serviceaccount-token-controller, statefulset-controller, storage-version-migrator-controller, storageversion-garbage-collector-controller, taint-eviction-controller, token-cleaner-controller, ttl-after-finished-controller, ttl-controller, validatingadmissionpolicy-status-controller, volumeattributesclass-protection-controllerDisabled-by-default controllers: bootstrap-signer-controller, selinux-warning-controller, token-cleaner-controller--disable-attach-detach-reconcile-syncDisable volume attach detach reconciler sync. Disabling this may cause volumes to be mismatched with pods. Use wisely.--disable-force-detach-on-timeoutPrevent force detaching volumes based on maximum unmount time and node status. If this flag is set to true, the non-graceful node shutdown feature must be used to recover from node failure. See https://k8s.io/docs/storage-disable-force-detach-on-timeout/.--disable-http2-servingIf true, HTTP2 serving will be disabled [default=false]--disabled-metrics stringsThis flag provides an escape hatch for misbehaving metrics. You must provide the fully qualified metric name in order to disable it. Disclaimer: disabling metrics is higher in precedence than showing hidden metrics.--emulated-version stringsThe versions different components emulate their capabilities (APIs, features, ...) of.If set, the component will emulate the behavior of this version instead of the underlying binary version.Version format could only be major.minor, for example: '--emulated-version=wardle=1.2,kube=1.31'.Options are: kube=1.31..1.33(default:1.33)If the component is not specified, defaults to "kube"--enable-dynamic-provisioning Default: trueEnable dynamic provisioning for environments that support it.--enable-garbage-collector Default: trueEnables the generic garbage collector. MUST be synced with the corresponding flag of the kube-apiserver.--enable-hostpath-provisionerEnable HostPath PV provisioning when running without a cloud provider. This allows testing and development of provisioning features. HostPath provisioning is not supported in any way, won't work in a multi-node cluster, and should not be used for anything other than testing or development.--enable-leader-migrationWhether to enable controller leader migration.--endpoint-updates-batch-period durationThe length of endpoint updates batching period. Processing of pod changes will be delayed by this duration to join them with potential upcoming updates and reduce the overall number of endpoints updates. Larger number = higher endpoint programming latency, but lower number of endpoints revision generated--endpointslice-updates-batch-period durationThe length of endpoint slice updates batching period. Processing of pod changes will be delayed by this duration to join them with potential upcoming updates and reduce the overall number of endpoints updates. Larger number = higher endpoint programming latency, but lower number of endpoints revision generated--external-cloud-volume-plugin stringThe plugin to use when cloud provider is set to external. Can be empty, should only be set when cloud-provider is external. Currently used to allow node-ipam-controller, persistentvolume-binder-controller, persistentvolume-expander-controller and attach-detach-controller to work for in tree cloud providers.--feature-gates colonSeparatedMultimapStringStringComma-separated list of component:key=value pairs that describe feature gates for alpha/experimental features of different components.If the component is not specified, defaults to "kube". This flag can be repeatedly invoked. For example: --feature-gates 'wardle:featureA=true,wardle:featureB=false' --feature-gates 'kube:featureC=true'Options are:kube:APIResponseCompression=true|false (BETA - default=true)kube:APIServerIdentity=true|false (BETA - default=true)kube:APIServerTracing=true|false (BETA - default=true)kube:APIServingWithRoutine=true|false (ALPHA - default=false)kube:AllAlpha=true|false (ALPHA - default=false)kube:AllBeta=true|false (BETA - default=false)kube:AllowParsingUserUIDFromCertAuth=true|false (BETA - default=true)kube:AllowUnsafeMalformedObjectDeletion=true|false (ALPHA - default=false)kube:AnonymousAuthConfigurableEndpoints=true|false (BETA - default=true)kube:AuthorizeNodeWithSelectors=true|false (BETA - default=true)kube:AuthorizeWithSelectors=true|false (BETA - default=true)kube:CBORServingAndStorage=true|false (ALPHA - default=false)kube:CPUManagerPolicyAlphaOptions=true|false (ALPHA - default=false)kube:CPUManagerPolicyBetaOptions=true|false (BETA - default=true)kube:CSIVolumeHealth=true|false (ALPHA - default=false)kube:ClientsAllowCBOR=true|false (ALPHA - default=false)kube:ClientsPreferCBOR=true|false (ALPHA - default=false)kube:CloudControllerManagerWebhook=true|false (ALPHA - default=false)kube:ClusterTrustBundle=true|false (BETA - default=false)kube:ClusterTrustBundleProjection=true|false (BETA - default=false)kube:ComponentFlagz=true|false (ALPHA - default=false)kube:ComponentStatusz=true|false (ALPHA - default=false)kube:ConcurrentWatchObjectDecode=true|false (BETA - default=false)kube:ConsistentListFromCache=true|false (BETA - default=true)kube:ContainerCheckpoint=true|false (BETA - default=true)kube:ContainerStopSignals=true|false (ALPHA - default=false)kube:ContextualLogging=true|false (BETA - default=true)kube:CoordinatedLeaderElection=true|false (BETA - default=false)kube:CrossNamespaceVolumeDataSource=true|false (ALPHA - default=false)kube:CustomCPUCFSQuotaPeriod=true|false (ALPHA - default=false)kube:DRAAdminAccess=true|false (ALPHA - default=false)kube:DRADeviceTaints=true|false (ALPHA - default=false)kube:DRAPartitionableDevices=true|false (ALPHA - default=false)kube:DRAPrioritizedList=true|false (ALPHA - default=false)kube:DRAResourceClaimDeviceStatus=true|false (BETA - default=true)kube:DeclarativeValidation=true|false (BETA - default=true)kube:DeclarativeValidationTakeover=true|false (BETA - default=false)kube:DeploymentReplicaSetTerminatingReplicas=true|false (ALPHA - default=false)kube:DisableAllocatorDualWrite=true|false (BETA - default=false)kube:DisableCPUQuotaWithExclusiveCPUs=true|false (BETA - default=true)kube:DynamicResourceAllocation=true|false (BETA - default=false)kube:EventedPLEG=true|false (ALPHA - default=false)kube:ExternalServiceAccountTokenSigner=true|false (ALPHA - default=false)kube:GracefulNodeShutdown=true|false (BETA - default=true)kube:GracefulNodeShutdownBasedOnPodPriority=true|false (BETA - default=true)kube:HPAConfigurableTolerance=true|false (ALPHA - default=false)kube:HPAScaleToZero=true|false (ALPHA - default=false)kube:ImageMaximumGCAge=true|false (BETA - default=true)kube:ImageVolume=true|false (BETA - default=false)kube:InOrderInformers=true|false (BETA - default=true)kube:InPlacePodVerticalScaling=true|false (BETA - default=true)kube:InPlacePodVerticalScalingExclusiveCPUs=true|false (ALPHA - default=false)kube:InTreePluginPortworxUnregister=true|false (ALPHA - default=false)kube:InformerResourceVersion=true|false (ALPHA - default=false)kube:JobManagedBy=true|false (BETA - default=true)kube:JobPodReplacementPolicy=true|false (BETA - default=true)kube:KubeletCgroupDriverFromCRI=true|false (BETA - default=true)kube:KubeletCrashLoopBackOffMax=true|false (ALPHA - default=false)kube:KubeletEnsureSecretPulledImages=true|false (ALPHA - default=false)kube:KubeletFineGrainedAuthz=true|false (BETA - default=true)kube:KubeletInUserNamespace=true|false (ALPHA - default=false)kube:KubeletPSI=true|false (ALPHA - default=false)kube:KubeletPodResourcesDynamicResources=true|false (ALPHA - default=false)kube:KubeletPodResourcesGet=true|false (ALPHA - default=false)kube:KubeletSeparateDiskGC=true|false (BETA - default=true)kube:KubeletServiceAccountTokenForCredentialProviders=true|false (ALPHA - default=false)kube:KubeletTracing=true|false (BETA - default=true)kube:ListFromCacheSnapshot=true|false (ALPHA - default=false)kube:LocalStorageCapacityIsolationFSQuotaMonitoring=true|false (BETA - default=false)kube:LoggingAlphaOptions=true|false (ALPHA - default=false)kube:LoggingBetaOptions=true|false (BETA - default=true)kube:MatchLabelKeysInPodTopologySpread=true|false (BETA - default=true)kube:MaxUnavailableStatefulSet=true|false (ALPHA - default=false)kube:MemoryQoS=true|false (ALPHA - default=false)kube:MutableCSINodeAllocatableCount=true|false (ALPHA - default=false)kube:MutatingAdmissionPolicy=true|false (ALPHA - default=false)kube:NodeLogQuery=true|false (BETA - default=false)kube:NodeSwap=true|false (BETA - default=true)kube:OpenAPIEnums=true|false (BETA - default=true)kube:OrderedNamespaceDeletion=true|false (BETA - default=true)kube:PodAndContainerStatsFromCRI=true|false (ALPHA - default=false)kube:PodDeletionCost=true|false (BETA - default=true)kube:PodLevelResources=true|false (ALPHA - default=false)kube:PodLifecycleSleepAction=true|false (BETA - default=true)kube:PodLifecycleSleepActionAllowZero=true|false (BETA - default=true)kube:PodLogsQuerySplitStreams=true|false (ALPHA - default=false)kube:PodObservedGenerationTracking=true|false (ALPHA - default=false)kube:PodReadyToStartContainersCondition=true|false (BETA - default=true)kube:PodTopologyLabelsAdmission=true|false (ALPHA - default=false)kube:PortForwardWebsockets=true|false (BETA - default=true)kube:PreferSameTrafficDistribution=true|false (ALPHA - default=false)kube:ProcMountType=true|false (BETA - default=true)kube:QOSReserved=true|false (ALPHA - default=false)kube:RecoverVolumeExpansionFailure=true|false (BETA - default=true)kube:ReduceDefaultCrashLoopBackOffDecay=true|false (ALPHA - default=false)kube:RelaxedDNSSearchValidation=true|false (BETA - default=true)kube:RelaxedEnvironmentVariableValidation=true|false (BETA - default=true)kube:ReloadKubeletServerCertificateFile=true|false (BETA - default=true)kube:RemoteRequestHeaderUID=true|false (BETA - default=true)kube:ResilientWatchCacheInitialization=true|false (BETA - default=true)kube:ResourceHealthStatus=true|false (ALPHA - default=false)kube:RotateKubeletServerCertificate=true|false (BETA - default=true)kube:RuntimeClassInImageCriApi=true|false (ALPHA - default=false)kube:SELinuxChangePolicy=true|false (BETA - default=true)kube:SELinuxMount=true|false (BETA - default=false)kube:SELinuxMountReadWriteOncePod=true|false (BETA - default=true)kube:SchedulerAsyncPreemption=true|false (BETA - default=true)kube:SchedulerPopFromBackoffQ=true|false (BETA - default=true)kube:SchedulerQueueingHints=true|false (BETA - default=true)kube:SeparateTaintEvictionController=true|false (BETA - default=true)kube:ServiceAccountNodeAudienceRestriction=true|false (BETA - default=true)kube:StorageCapacityScoring=true|false (ALPHA - default=false)kube:StorageVersionAPI=true|false (ALPHA - default=false)kube:StorageVersionHash=true|false (BETA - default=true)kube:StorageVersionMigrator=true|false (ALPHA - default=false)kube:StreamingCollectionEncodingToJSON=true|false (BETA - default=true)kube:StreamingCollectionEncodingToProtobuf=true|false (BETA - default=true)kube:StrictIPCIDRValidation=true|false (ALPHA - default=false)kube:StructuredAuthenticationConfiguration=true|false (BETA - default=true)kube:SupplementalGroupsPolicy=true|false (BETA - default=true)kube:SystemdWatchdog=true|false (BETA - default=true)kube:TopologyManagerPolicyAlphaOptions=true|false (ALPHA - default=false)kube:TopologyManagerPolicyBetaOptions=true|false (BETA - default=true)kube:TranslateStreamCloseWebsocketRequests=true|false (BETA - default=true)kube:UnauthenticatedHTTP2DOSMitigation=true|false (BETA - default=true)kube:UnknownVersionInteroperabilityProxy=true|false (ALPHA - default=false)kube:UserNamespacesPodSecurityStandards=true|false (ALPHA - default=false)kube:UserNamespacesSupport=true|false (BETA - default=true)kube:VolumeAttributesClass=true|false (BETA - default=false)kube:WatchCacheInitializationPostStartHook=true|false (BETA - default=false)kube:WatchList=true|false (BETA - default=false)kube:WatchListClient=true|false (BETA - default=false)kube:WinDSR=true|false (BETA - default=true)kube:WinOverlay=true|false (BETA - default=true)kube:WindowsCPUAndMemoryAffinity=true|false (ALPHA - default=false)kube:WindowsGracefulNodeShutdown=true|false (ALPHA - default=false)--flex-volume-plugin-dir string Default: "/usr/libexec/kubernetes/kubelet-plugins/volume/exec/"Full path of the directory in which the flex volume plugin should search for additional third party volume plugins.-h, --helphelp for kube-controller-manager--horizontal-pod-autoscaler-cpu-initialization-period duration Default: 5m0sThe period after pod start when CPU samples might be skipped.--horizontal-pod-autoscaler-downscale-stabilization duration Default: 5m0sThe period for which autoscaler will look backwards and not scale down below any recommendation it made during that period.--horizontal-pod-autoscaler-initial-readiness-delay duration Default: 30sThe period after pod start during which readiness changes will be treated as initial readiness.--horizontal-pod-autoscaler-sync-period duration Default: 15sThe period for syncing the number of pods in horizontal pod autoscaler.--horizontal-pod-autoscaler-tolerance float Default: 0.1The minimum change (from 1.0) in the desired-to-actual metrics ratio for the horizontal pod autoscaler to consider scaling.--http2-max-streams-per-connection intThe limit that the server gives to clients for the maximum number of streams in an HTTP/2 connection. Zero means to use golang's default.--kube-api-burst int32 Default: 30Burst to use while talking with kubernetes apiserver.--kube-api-content-type string Default: "application/vnd.kubernetes.protobuf"Content type of requests sent to apiserver.--kube-api-qps float Default: 20QPS to use while talking with kubernetes apiserver.--kubeconfig stringPath to kubeconfig file with authorization and master location information (the master location can be overridden by the master flag).--large-cluster-size-threshold int32 Default: 50Number of nodes from which node-lifecycle-controller treats the cluster as large for the eviction logic purposes. --secondary-node-eviction-rate is implicitly overridden to 0 for clusters this size or smaller. Notice: If nodes reside in multiple zones, this threshold will be considered as zone node size threshold for each zone to determine node eviction rate independently.--leader-elect Default: trueStart a leader election client and gain leadership before executing the main loop. Enable this when running replicated components for high availability.--leader-elect-lease-duration duration Default: 15sThe duration that non-leader candidates will wait after observing a leadership renewal until attempting to acquire leadership of a led but unrenewed leader slot. This is effectively the maximum duration that a leader can be stopped before it is replaced by another candidate. This is only applicable if leader election is enabled.--leader-elect-renew-deadline duration Default: 10sThe interval between attempts by the acting master to renew a leadership slot before it stops leading. This must be less than the lease duration. This is only applicable if leader election is enabled.--leader-elect-resource-lock string Default: "leases"The type of resource object that is used for locking during leader election. Supported options are 'leases'.--leader-elect-resource-name string Default: "kube-controller-manager"The name of resource object that is used for locking during leader election.--leader-elect-resource-namespace string Default: "kube-system"The namespace of resource object that is used for locking during leader election.--leader-elect-retry-period duration Default: 2sThe duration the clients should wait between attempting acquisition and renewal of a leadership. This is only applicable if leader election is enabled.--leader-migration-config stringPath to the config file for controller leader migration, or empty to use the value that reflects default configuration of the controller manager. The config file should be of type LeaderMigrationConfiguration, group controllermanager.config.k8s.io, version v1alpha1.--legacy-service-account-token-clean-up-period duration Default: 8760h0m0sThe period of time since the last usage of an legacy service account token before it can be deleted.--log-flush-frequency duration Default: 5sMaximum number of seconds between log flushes--log-text-info-buffer-size quantity[Alpha] In text format with split output streams, the info messages can be buffered for a while to increase performance. The default value of zero bytes disables buffering. The size can be specified as number of bytes (512), multiples of 1000 (1K), multiples of 1024 (2Ki), or powers of those (3M, 4G, 5Mi, 6Gi). Enable the LoggingAlphaOptions feature gate to use this.--log-text-split-stream[Alpha] In text format, write error messages to stderr and info messages to stdout. The default is to write a single stream to stdout. Enable the LoggingAlphaOptions feature gate to use this.--logging-format string Default: "text"Sets the log format. Permitted formats: "text".--master stringThe address of the Kubernetes API server (overrides any value in kubeconfig).--max-endpoints-per-slice int32 Default: 100The maximum number of endpoints that will be added to an EndpointSlice. More endpoints per slice will result in less endpoint slices, but larger resources. Defaults to 100.--min-resync-period duration Default: 12h0m0sThe resync period in reflectors will be random between MinResyncPeriod and 2*MinResyncPeriod.--mirroring-concurrent-service-endpoint-syncs int32 Default: 5The number of service endpoint syncing operations that will be done concurrently by the endpointslice-mirroring-controller. Larger number = faster endpoint slice updating, but more CPU (and network) load. Defaults to 5.--mirroring-endpointslice-updates-batch-period durationThe length of EndpointSlice updates batching period for endpointslice-mirroring-controller. Processing of EndpointSlice changes will be delayed by this duration to join them with potential upcoming updates and reduce the overall number of EndpointSlice updates. Larger number = higher endpoint programming latency, but lower number of endpoints revision generated--mirroring-max-endpoints-per-subset int32 Default: 1000The maximum number of endpoints that will be added to an EndpointSlice by the endpointslice-mirroring-controller. More endpoints per slice will result in less endpoint slices, but larger resources. Defaults to 100.--namespace-sync-period duration Default: 5m0sThe period for syncing namespace life-cycle updates--node-cidr-mask-size int32Mask size for node cidr in cluster. Default is 24 for IPv4 and 64 for IPv6.--node-cidr-mask-size-ipv4 int32Mask size for IPv4 node cidr in dual-stack cluster. Default is 24.--node-cidr-mask-size-ipv6 int32Mask size for IPv6 node cidr in dual-stack cluster. Default is 64.--node-eviction-rate float Default: 0.1Number of nodes per second on which pods are deleted in case of node failure when a zone is healthy (see --unhealthy-zone-threshold for definition of healthy/unhealthy). Zone refers to entire cluster in non-multizone clusters.--node-monitor-grace-period duration Default: 50sAmount of time which we allow running Node to be unresponsive before marking it unhealthy. Must be N times more than kubelet's nodeStatusUpdateFrequency, where N means number of retries allowed for kubelet to post node status. This value should also be greater than the sum of HTTP2_PING_TIMEOUT_SECONDS and HTTP2_READ_IDLE_TIMEOUT_SECONDS--node-monitor-period duration Default: 5sThe period for syncing NodeStatus in cloud-node-lifecycle-controller.--node-startup-grace-period duration Default: 1m0sAmount of time which we allow starting Node to be unresponsive before marking it unhealthy.--permit-address-sharingIf true, SO_REUSEADDR will be used when binding the port. This allows binding to wildcard IPs like 0.0.0.0 and specific IPs in parallel, and it avoids waiting for the kernel to release sockets in TIME_WAIT state. [default=false]--permit-port-sharingIf true, SO_REUSEPORT will be used when binding the port, which allows more than one instance to bind on the same address and port. [default=false]--profiling Default: trueEnable profiling via web interface host:port/debug/pprof/--pv-recycler-increment-timeout-nfs int32 Default: 30the increment of time added per Gi to ActiveDeadlineSeconds for an NFS scrubber pod--pv-recycler-minimum-timeout-hostpath int32 Default: 60The minimum ActiveDeadlineSeconds to use for a HostPath Recycler pod. This is for development and testing only and will not work in a multi-node cluster.--pv-recycler-minimum-timeout-nfs int32 Default: 300The minimum ActiveDeadlineSeconds to use for an NFS Recycler pod--pv-recycler-pod-template-filepath-hostpath stringThe file path to a pod definition used as a template for HostPath persistent volume recycling. This is for development and testing only and will not work in a multi-node cluster.--pv-recycler-pod-template-filepath-nfs stringThe file path to a pod definition used as a template for NFS persistent volume recycling--pv-recycler-timeout-increment-hostpath int32 Default: 30the increment of time added per Gi to ActiveDeadlineSeconds for a HostPath scrubber pod. This is for development and testing only and will not work in a multi-node cluster.--pvclaimbinder-sync-period duration Default: 15sThe period for syncing persistent volumes and persistent volume claims--requestheader-allowed-names stringsList of client certificate common names to allow to provide usernames in headers specified by --requestheader-username-headers. If empty, any client certificate validated by the authorities in --requestheader-client-ca-file is allowed.--requestheader-client-ca-file stringRoot certificate bundle to use to verify client certificates on incoming requests before trusting usernames in headers specified by --requestheader-username-headers. WARNING: generally do not depend on authorization being already done for incoming requests.--requestheader-extra-headers-prefix strings Default: "x-remote-extra-"List of request header prefixes to inspect. X-Remote-Extra- is suggested.--requestheader-group-headers strings Default: "x-remote-group"List of request headers to inspect for groups. X-Remote-Group is suggested.--requestheader-uid-headers stringsList of request headers to inspect for UIDs. X-Remote-Uid is suggested. Requires the RemoteRequestHeaderUID feature to be enabled.--requestheader-username-headers strings Default: "x-remote-user"List of request headers to inspect for usernames. X-Remote-User is common.--resource-quota-sync-period duration Default: 5m0sThe period for syncing quota usage status in the system--root-ca-file stringIf set, this root certificate authority will be included in service account's token secret. This must be a valid PEM-encoded CA bundle.--route-reconciliation-period duration Default: 10sThe period for reconciling routes created for Nodes by cloud provider.--secondary-node-eviction-rate float Default: 0.01Number of nodes per second on which pods are deleted in case of node failure when a zone is unhealthy (see --unhealthy-zone-threshold for definition of healthy/unhealthy). Zone refers to entire cluster in non-multizone clusters. This value is implicitly overridden to 0 if the cluster size is smaller than --large-cluster-size-threshold.--secure-port int Default: 10257The port on which to serve HTTPS with authentication and authorization. If 0, don't serve HTTPS at all.--service-account-private-key-file stringEnables legacy secret-based tokens when set. Filename containing a PEM-encoded private RSA or ECDSA key used to sign service account tokens.--service-cluster-ip-range stringCIDR Range for Services in cluster. Only used when --allocate-node-cidrs=true; if false, this option will be ignored.--show-hidden-metrics-for-version stringThe previous version for which you want to show hidden metrics. Only the previous minor version is meaningful, other values will not be allowed. The format is <major>.<minor>, e.g.: '1.16'. The purpose of this format is make sure you have the opportunity to notice if the next release hides additional metrics, rather than being surprised when they are permanently removed in the release after that.--terminated-pod-gc-threshold int32 Default: 12500Number of terminated pods that can exist before the terminated pod garbage collector starts deleting terminated pods. If <= 0, the terminated pod garbage collector is disabled.--tls-cert-file stringFile containing the default x509 Certificate for HTTPS. (CA cert, if any, concatenated after server cert). If HTTPS serving is enabled, and --tls-cert-file and --tls-private-key-file are not provided, a self-signed certificate and key are generated for the public address and saved to the directory specified by --cert-dir.--tls-cipher-suites stringsComma-separated list of cipher suites for the server. If omitted, the default Go cipher suites will be used.Preferred values: TLS_AES_128_GCM_SHA256, TLS_AES_256_GCM_SHA384, TLS_CHACHA20_POLY1305_SHA256, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305, TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305, TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256.Insecure values: TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_RSA_WITH_RC4_128_SHA, TLS_RSA_WITH_3DES_EDE_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_256_GCM_SHA384, TLS_RSA_WITH_RC4_128_SHA.--tls-min-version stringMinimum TLS version supported. Possible values: VersionTLS10, VersionTLS11, VersionTLS12, VersionTLS13--tls-private-key-file stringFile containing the default x509 private key matching --tls-cert-file.--tls-sni-cert-key stringA pair of x509 certificate and private key file paths, optionally suffixed with a list of domain patterns which are fully qualified domain names, possibly with prefixed wildcard segments. The domain patterns also allow IP addresses, but IPs should only be used if the apiserver has visibility to the IP address requested by a client. If no domain patterns are provided, the names of the certificate are extracted. Non-wildcard matches trump over wildcard matches, explicit domain patterns trump over extracted names. For multiple key/certificate pairs, use the --tls-sni-cert-key multiple times. Examples: "example.crt,example.key" or "foo.crt,foo.key:*.foo.com,foo.com".--unhealthy-zone-threshold float Default: 0.55Fraction of Nodes in a zone which needs to be not Ready (minimum 3) for zone to be treated as unhealthy.--use-service-account-credentialsIf true, use individual service account credentials for each controller.-v, --v intnumber for the log level verbosity--version version[=true]--version, --version=raw prints version information and quits; --version=vX.Y.Z... sets the reported version--vmodule pattern=N,...comma-separated list of pattern=N settings for file-filtered logging (only works for text log format)This page is automatically generated.If you plan to report an issue with this page, mention that the page is auto-generated in your issue description. The fix may need to happen elsewhere in the Kubernetes project.

kube-controller-manager


Assign Pods to NodesThis page shows how to assign a Kubernetes Pod to a particular node in a Kubernetes cluster.Before you beginYou need to have a Kubernetes cluster, and the kubectl command-line tool must be configured to communicate with your cluster. It is recommended to run this tutorial on a cluster with at least two nodes that are not acting as control plane hosts. If you do not already have a cluster, you can create one by using minikube or you can use one of these Kubernetes playgrounds:iximiuz LabsKillercodaKodeKloudPlay with KubernetesTo check the version, enter kubectl version.Add a label to a nodeList the nodes in your cluster, along with their labels:kubectl get nodes --show-labels The output is similar to this:NAME STATUS ROLES AGE VERSION LABELS worker0 Ready <none> 1d v1.13.0 ...,kubernetes.io/hostname=worker0 worker1 Ready <none> 1d v1.13.0 ...,kubernetes.io/hostname=worker1 worker2 Ready <none> 1d v1.13.0 ...,kubernetes.io/hostname=worker2 Choose one of your nodes, and add a label to it:kubectl label nodes <your-node-name> disktype=ssd where <your-node-name> is the name of your chosen node.Verify that your chosen node has a disktype=ssd label:kubectl get nodes --show-labels The output is similar to this:NAME STATUS ROLES AGE VERSION LABELS worker0 Ready <none> 1d v1.13.0 ...,disktype=ssd,kubernetes.io/hostname=worker0 worker1 Ready <none> 1d v1.13.0 ...,kubernetes.io/hostname=worker1 worker2 Ready <none> 1d v1.13.0 ...,kubernetes.io/hostname=worker2 In the preceding output, you can see that the worker0 node has a disktype=ssd label.Create a pod that gets scheduled to your chosen nodeThis pod configuration file describes a pod that has a node selector, disktype: ssd. This means that the pod will get scheduled on a node that has a disktype=ssd label.pods/pod-nginx.yaml apiVersion: v1 kind: Pod metadata: name: nginx labels: env: test spec: containers: - name: nginx image: nginx imagePullPolicy: IfNotPresent nodeSelector: disktype: ssd Use the configuration file to create a pod that will get scheduled on your chosen node:kubectl apply -f https://k8s.io/examples/pods/pod-nginx.yaml Verify that the pod is running on your chosen node:kubectl get pods --output=wide The output is similar to this:NAME READY STATUS RESTARTS AGE IP NODE nginx 1/1 Running 0 13s 10.200.0.4 worker0 Create a pod that gets scheduled to specific nodeYou can also schedule a pod to one specific node via setting nodeName.pods/pod-nginx-specific-node.yaml apiVersion: v1 kind: Pod metadata: name: nginx spec: nodeName: foo-node # schedule pod to specific node containers: - name: nginx image: nginx imagePullPolicy: IfNotPresent Use the configuration file to create a pod that will get scheduled on foo-node only.What's nextLearn more about labels and selectors.Learn more about nodes.

Assign Pods to Nodes


Taints and TolerationsNode affinity is a property of Pods that attracts them to a set of nodes (either as a preference or a hard requirement). Taints are the opposite -- they allow a node to repel a set of pods.Tolerations are applied to pods. Tolerations allow the scheduler to schedule pods with matching taints. Tolerations allow scheduling but don't guarantee scheduling: the scheduler also evaluates other parameters as part of its function.Taints and tolerations work together to ensure that pods are not scheduled onto inappropriate nodes. One or more taints are applied to a node; this marks that the node should not accept any pods that do not tolerate the taints.ConceptsYou add a taint to a node using kubectl taint. For example,kubectl taint nodes node1 key1=value1:NoSchedule places a taint on node node1. The taint has key key1, value value1, and taint effect NoSchedule. This means that no pod will be able to schedule onto node1 unless it has a matching toleration.To remove the taint added by the command above, you can run:kubectl taint nodes node1 key1=value1:NoSchedule- You specify a toleration for a pod in the PodSpec. Both of the following tolerations "match" the taint created by the kubectl taint line above, and thus a pod with either toleration would be able to schedule onto node1:tolerations: - key: "key1" operator: "Equal" value: "value1" effect: "NoSchedule" tolerations: - key: "key1" operator: "Exists" effect: "NoSchedule" The default Kubernetes scheduler takes taints and tolerations into account when selecting a node to run a particular Pod. However, if you manually specify the .spec.nodeName for a Pod, that action bypasses the scheduler; the Pod is then bound onto the node where you assigned it, even if there are NoSchedule taints on that node that you selected. If this happens and the node also has a NoExecute taint set, the kubelet will eject the Pod unless there is an appropriate tolerance set.Here's an example of a pod that has some tolerations defined:pods/pod-with-toleration.yaml apiVersion: v1 kind: Pod metadata: name: nginx labels: env: test spec: containers: - name: nginx image: nginx imagePullPolicy: IfNotPresent tolerations: - key: "example-key" operator: "Exists" effect: "NoSchedule" The default value for operator is Equal.A toleration "matches" a taint if the keys are the same and the effects are the same, and:the operator is Exists (in which case no value should be specified), orthe operator is Equal and the values should be equal.Note:There are two special cases:If the key is empty, then the operator must be Exists, which matches all keys and values. Note that the effect still needs to be matched at the same time.An empty effect matches all effects with key key1.The above example used the effect of NoSchedule. Alternatively, you can use the effect of PreferNoSchedule.The allowed values for the effect field are:NoExecuteThis affects pods that are already running on the node as follows:Pods that do not tolerate the taint are evicted immediatelyPods that tolerate the taint without specifying tolerationSeconds in their toleration specification remain bound foreverPods that tolerate the taint with a specified tolerationSeconds remain bound for the specified amount of time. After that time elapses, the node lifecycle controller evicts the Pods from the node.NoScheduleNo new Pods will be scheduled on the tainted node unless they have a matching toleration. Pods currently running on the node are not evicted.PreferNoSchedulePreferNoSchedule is a "preference" or "soft" version of NoSchedule. The control plane will try to avoid placing a Pod that does not tolerate the taint on the node, but it is not guaranteed.You can put multiple taints on the same node and multiple tolerations on the same pod. The way Kubernetes processes multiple taints and tolerations is like a filter: start with all of a node's taints, then ignore the ones for which the pod has a matching toleration; the remaining un-ignored taints have the indicated effects on the pod. In particular,if there is at least one un-ignored taint with effect NoSchedule then Kubernetes will not schedule the pod onto that nodeif there is no un-ignored taint with effect NoSchedule but there is at least one un-ignored taint with effect PreferNoSchedule then Kubernetes will try to not schedule the pod onto the nodeif there is at least one un-ignored taint with effect NoExecute then the pod will be evicted from the node (if it is already running on the node), and will not be scheduled onto the node (if it is not yet running on the node).For example, imagine you taint a node like thiskubectl taint nodes node1 key1=value1:NoSchedule kubectl taint nodes node1 key1=value1:NoExecute kubectl taint nodes node1 key2=value2:NoSchedule And a pod has two tolerations:tolerations: - key: "key1" operator: "Equal" value: "value1" effect: "NoSchedule" - key: "key1" operator: "Equal" value: "value1" effect: "NoExecute" In this case, the pod will not be able to schedule onto the node, because there is no toleration matching the third taint. But it will be able to continue running if it is already running on the node when the taint is added, because the third taint is the only one of the three that is not tolerated by the pod.Normally, if a taint with effect NoExecute is added to a node, then any pods that do not tolerate the taint will be evicted immediately, and pods that do tolerate the taint will never be evicted. However, a toleration with NoExecute effect can specify an optional tolerationSeconds field that dictates how long the pod will stay bound to the node after the taint is added. For example,tolerations: - key: "key1" operator: "Equal" value: "value1" effect: "NoExecute" tolerationSeconds: 3600 means that if this pod is running and a matching taint is added to the node, then the pod will stay bound to the node for 3600 seconds, and then be evicted. If the taint is removed before that time, the pod will not be evicted.Example Use CasesTaints and tolerations are a flexible way to steer pods away from nodes or evict pods that shouldn't be running. A few of the use cases areDedicated Nodes: If you want to dedicate a set of nodes for exclusive use by a particular set of users, you can add a taint to those nodes (say, kubectl taint nodes nodename dedicated=groupName:NoSchedule) and then add a corresponding toleration to their pods (this would be done most easily by writing a custom admission controller). The pods with the tolerations will then be allowed to use the tainted (dedicated) nodes as well as any other nodes in the cluster. If you want to dedicate the nodes to them and ensure they only use the dedicated nodes, then you should additionally add a label similar to the taint to the same set of nodes (e.g. dedicated=groupName), and the admission controller should additionally add a node affinity to require that the pods can only schedule onto nodes labeled with dedicated=groupName.Nodes with Special Hardware: In a cluster where a small subset of nodes have specialized hardware (for example GPUs), it is desirable to keep pods that don't need the specialized hardware off of those nodes, thus leaving room for later-arriving pods that do need the specialized hardware. This can be done by tainting the nodes that have the specialized hardware (e.g. kubectl taint nodes nodename special=true:NoSchedule or kubectl taint nodes nodename special=true:PreferNoSchedule) and adding a corresponding toleration to pods that use the special hardware. As in the dedicated nodes use case, it is probably easiest to apply the tolerations using a custom admission controller. For example, it is recommended to use Extended Resources to represent the special hardware, taint your special hardware nodes with the extended resource name and run the ExtendedResourceToleration admission controller. Now, because the nodes are tainted, no pods without the toleration will schedule on them. But when you submit a pod that requests the extended resource, the ExtendedResourceToleration admission controller will automatically add the correct toleration to the pod and that pod will schedule on the special hardware nodes. This will make sure that these special hardware nodes are dedicated for pods requesting such hardware and you don't have to manually add tolerations to your pods.Taint based Evictions: A per-pod-configurable eviction behavior when there are node problems, which is described in the next section.Taint based EvictionsFEATURE STATE: Kubernetes v1.18 [stable]The node controller automatically taints a Node when certain conditions are true. The following taints are built in:node.kubernetes.io/not-ready: Node is not ready. This corresponds to the NodeCondition Ready being "False".node.kubernetes.io/unreachable: Node is unreachable from the node controller. This corresponds to the NodeCondition Ready being "Unknown".node.kubernetes.io/memory-pressure: Node has memory pressure.node.kubernetes.io/disk-pressure: Node has disk pressure.node.kubernetes.io/pid-pressure: Node has PID pressure.node.kubernetes.io/network-unavailable: Node's network is unavailable.node.kubernetes.io/unschedulable: Node is unschedulable.node.cloudprovider.kubernetes.io/uninitialized: When the kubelet is started with an "external" cloud provider, this taint is set on a node to mark it as unusable. After a controller from the cloud-controller-manager initializes this node, the kubelet removes this taint.In case a node is to be drained, the node controller or the kubelet adds relevant taints with NoExecute effect. This effect is added by default for the node.kubernetes.io/not-ready and node.kubernetes.io/unreachable taints. If the fault condition returns to normal, the kubelet or node controller can remove the relevant taint(s).In some cases when the node is unreachable, the API server is unable to communicate with the kubelet on the node. The decision to delete the pods cannot be communicated to the kubelet until communication with the API server is re-established. In the meantime, the pods that are scheduled for deletion may continue to run on the partitioned node.Note:The control plane limits the rate of adding new taints to nodes. This rate limiting manages the number of evictions that are triggered when many nodes become unreachable at once (for example: if there is a network disruption).You can specify tolerationSeconds for a Pod to define how long that Pod stays bound to a failing or unresponsive Node.For example, you might want to keep an application with a lot of local state bound to node for a long time in the event of network partition, hoping that the partition will recover and thus the pod eviction can be avoided. The toleration you set for that Pod might look like:tolerations: - key: "node.kubernetes.io/unreachable" operator: "Exists" effect: "NoExecute" tolerationSeconds: 6000 Note:Kubernetes automatically adds a toleration for node.kubernetes.io/not-ready and node.kubernetes.io/unreachable with tolerationSeconds=300, unless you, or a controller, set those tolerations explicitly.These automatically-added tolerations mean that Pods remain bound to Nodes for 5 minutes after one of these problems is detected.DaemonSet pods are created with NoExecute tolerations for the following taints with no tolerationSeconds:node.kubernetes.io/unreachablenode.kubernetes.io/not-readyThis ensures that DaemonSet pods are never evicted due to these problems.Note:The node controller was responsible for adding taints to nodes and evicting pods. But after 1.29, the taint-based eviction implementation has been moved out of node controller into a separate, and independent component called taint-eviction-controller. Users can optionally disable taint-based eviction by setting --controllers=-taint-eviction-controller in kube-controller-manager.Taint Nodes by ConditionThe control plane, using the node controller, automatically creates taints with a NoSchedule effect for node conditions.The scheduler checks taints, not node conditions, when it makes scheduling decisions. This ensures that node conditions don't directly affect scheduling. For example, if the DiskPressure node condition is active, the control plane adds the node.kubernetes.io/disk-pressure taint and does not schedule new pods onto the affected node. If the MemoryPressure node condition is active, the control plane adds the node.kubernetes.io/memory-pressure taint.You can ignore node conditions for newly created pods by adding the corresponding Pod tolerations. The control plane also adds the node.kubernetes.io/memory-pressure toleration on pods that have a QoS class other than BestEffort. This is because Kubernetes treats pods in the Guaranteed or Burstable QoS classes (even pods with no memory request set) as if they are able to cope with memory pressure, while new BestEffort pods are not scheduled onto the affected node.The DaemonSet controller automatically adds the following NoSchedule tolerations to all daemons, to prevent DaemonSets from breaking.node.kubernetes.io/memory-pressurenode.kubernetes.io/disk-pressurenode.kubernetes.io/pid-pressure (1.14 or later)node.kubernetes.io/unschedulable (1.10 or later)node.kubernetes.io/network-unavailable (host network only)Adding these tolerations ensures backward compatibility. You can also add arbitrary tolerations to DaemonSets.Device taints and tolerationsInstead of tainting entire nodes, administrators can also taint individual devices when the cluster uses dynamic resource allocation to manage special hardware. The advantage is that tainting can be targeted towards exactly the hardware that is faulty or needs maintenance. Tolerations are also supported and can be specified when requesting devices. Like taints they apply to all pods which share the same allocated device.What's nextRead about Node-pressure Eviction and how you can configure itRead about Pod PriorityRead about device taints and tolerations

Taints and Tolerations


kubectl port-forwardSynopsisForward one or more local ports to a pod.Use resource type/name such as deployment/mydeployment to select a pod. Resource type defaults to 'pod' if omitted.If there are multiple pods matching the criteria, a pod will be selected automatically. The forwarding session ends when the selected pod terminates, and a rerun of the command is needed to resume forwarding.kubectl port-forward TYPE/NAME [options] [LOCAL_PORT:]REMOTE_PORT [...[LOCAL_PORT_N:]REMOTE_PORT_N] Examples # Listen on ports 5000 and 6000 locally, forwarding data to/from ports 5000 and 6000 in the pod kubectl port-forward pod/mypod 5000 6000 # Listen on ports 5000 and 6000 locally, forwarding data to/from ports 5000 and 6000 in a pod selected by the deployment kubectl port-forward deployment/mydeployment 5000 6000 # Listen on port 8443 locally, forwarding to the targetPort of the service's port named "https" in a pod selected by the service kubectl port-forward service/myservice 8443:https # Listen on port 8888 locally, forwarding to 5000 in the pod kubectl port-forward pod/mypod 8888:5000 # Listen on port 8888 on all addresses, forwarding to 5000 in the pod kubectl port-forward --address 0.0.0.0 pod/mypod 8888:5000 # Listen on port 8888 on localhost and selected IP, forwarding to 5000 in the pod kubectl port-forward --address localhost,10.19.21.23 pod/mypod 8888:5000 # Listen on a random port locally, forwarding to 5000 in the pod kubectl port-forward pod/mypod :5000 Options--address strings Default: "localhost"Addresses to listen on (comma separated). Only accepts IP addresses or localhost as a value. When localhost is supplied, kubectl will try to bind on both 127.0.0.1 and ::1 and will fail if neither of these addresses are available to bind.-h, --helphelp for port-forward--pod-running-timeout duration Default: 1m0sThe length of time (like 5s, 2m, or 3h, higher than zero) to wait until at least one pod is runningParent Options Inherited--as stringUsername to impersonate for the operation. User could be a regular user or a service account in a namespace.--as-group stringsGroup to impersonate for the operation, this flag can be repeated to specify multiple groups.--as-uid stringUID to impersonate for the operation.--cache-dir string Default: "$HOME/.kube/cache"Default cache directory--certificate-authority stringPath to a cert file for the certificate authority--client-certificate stringPath to a client certificate file for TLS--client-key stringPath to a client key file for TLS--cluster stringThe name of the kubeconfig cluster to use--context stringThe name of the kubeconfig context to use--disable-compressionIf true, opt-out of response compression for all requests to the server--insecure-skip-tls-verifyIf true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure--kubeconfig stringPath to the kubeconfig file to use for CLI requests.--kuberc stringPath to the kuberc file to use for preferences. This can be disabled by exporting KUBECTL_KUBERC=false feature gate or turning off the feature KUBERC=off.--match-server-versionRequire server version to match client version-n, --namespace stringIf present, the namespace scope for this CLI request--password stringPassword for basic authentication to the API server--profile string Default: "none"Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex)--profile-output string Default: "profile.pprof"Name of the file to write the profile to--request-timeout string Default: "0"The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests.-s, --server stringThe address and port of the Kubernetes API server--storage-driver-buffer-duration duration Default: 1m0sWrites in the storage driver will be buffered for this duration, and committed to the non memory backends as a single transaction--storage-driver-db string Default: "cadvisor"database name--storage-driver-host string Default: "localhost:8086"database host:port--storage-driver-password string Default: "root"database password--storage-driver-secureuse secure connection with database--storage-driver-table string Default: "stats"table name--storage-driver-user string Default: "root"database username--tls-server-name stringServer name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used--token stringBearer token for authentication to the API server--user stringThe name of the kubeconfig user to use--username stringUsername for basic authentication to the API server--version version[=true]--version, --version=raw prints version information and quits; --version=vX.Y.Z... sets the reported version--warnings-as-errorsTreat warnings received from the server as errors and exit with a non-zero exit codeSee Alsokubectl - kubectl controls the Kubernetes cluster managerThis page is automatically generated.If you plan to report an issue with this page, mention that the page is auto-generated in your issue description. The fix may need to happen elsewhere in the Kubernetes project.

kubectl port-forward