kube-controller-manager 參數(shù)
Controller manager是一個(gè)處理集群中常規(guī)任務(wù)的后臺(tái)線程,通過(guò) apiserver 監(jiān)視集群的共享狀態(tài),并將當(dāng)前狀態(tài)修改到所需狀態(tài)。
Controller Manager 內(nèi)部包含多個(gè) Controller,每種 Controller 都負(fù)責(zé)一種具體的控制流程。
| 參數(shù)名 | 含義 | 默認(rèn)值 |
|---|---|---|
| 調(diào)試參數(shù) | ======================================================================================================== | ===== |
| contention-profiling | 如果啟用了 profiling,則啟用鎖爭(zhēng)用性分析 | |
| profiling | 通過(guò)Web界面啟用性能分析 host:port/debug/pprof/ | |
| 通用參數(shù) | ======================================================================================================== | ===== |
| allocate-node-cidrs | 是否應(yīng)在云提供商上分配和設(shè)置Pod的CIDR。 | |
| cidr-allocator-type | 使用的CIDR分配器的類型 | RangeAllocator |
| cloud-config | 云提供程序配置文件的路徑??兆址硎緵](méi)有配置文件。 | |
| cloud-provider | 云服務(wù)提供商??兆址硎緵](méi)有提供者。 | |
| cloud-provider-gce-lb-src-cidrs | 在GCE防火墻中打開(kāi)CIDR以進(jìn)行LB流量代理和運(yùn)行狀況檢查 | 130.211.0.0/22,209.85.152.0/22,209.85.204.0/22,35.191.0.0/16 |
| cluster-cidr | 集群中Pod的CIDR范圍。要求--allocate-node-cidrs為true | |
| cluster-name | 集群的實(shí)例前綴。 | kubernetes |
| configure-cloud-routes | 是否應(yīng)在云提供商上配置allocate-node-cidrs分配的CIDR | true |
| controller-start-interval | 啟動(dòng) controller manager 之間的間隔。 | |
| controllers | 要啟用的控制器列表。 '*'啟用所有默認(rèn)控制器,'foo'啟用名為'foo'的控制器,'-foo'禁用名為 foo 的控制器 |
|
| external-cloud-volume-plugin | 云供應(yīng)商為外部時(shí)使用的插件。僅在云提供商為外部時(shí)可以設(shè)置空。目前僅用于為樹(shù)云提供商工作的節(jié)點(diǎn)控制器和卷控制器。 | |
| feature-gates | 一組key = value對(duì),用于描述特征處于alpha / experimental狀態(tài)。 | |
| kube-api-burst | 在與kubernetes apiserver 交互時(shí)使用。 | 30 |
| kube-api-content-type | 發(fā)送到apiserver的請(qǐng)求的內(nèi)容類型。 | application/vnd.kubernetes.protobuf |
| kube-api-qps | 與kubernetes apiserver交互時(shí)使用的QPS。 | 20 |
| leader-elect | 在執(zhí)行主要任務(wù)之前,啟動(dòng)領(lǐng)導(dǎo)者選舉并獲得領(lǐng)導(dǎo)權(quán)。在運(yùn)行多個(gè)組件以實(shí)現(xiàn)高可用性時(shí)啟用此選項(xiàng)。 | true |
| leader-elect-lease-duration | 從非領(lǐng)導(dǎo)候選人在觀察到領(lǐng)導(dǎo)權(quán)更新,到試圖競(jìng)選領(lǐng)導(dǎo)但未成為領(lǐng)導(dǎo)者的持續(xù)時(shí)間。這實(shí)際上是一個(gè)領(lǐng)導(dǎo)者在被另一個(gè)候選人替換之前可以被阻止的最大持續(xù)時(shí)間。這僅適用于啟用領(lǐng)導(dǎo)者選舉的情況。 | 15 |
| leader-elect-renew-deadline | 領(lǐng)導(dǎo)重申領(lǐng)導(dǎo)身份的間隔時(shí)間。小于等于 lease-duration。這僅適用于啟用領(lǐng)導(dǎo)者選舉的情況。 | 10s |
| leader-elect-resource-lock | 在領(lǐng)導(dǎo)者選舉期間用于鎖定的資源對(duì)象的類型。 | endpoints |
| leader-elect-retry-period | client 在嘗試獲取領(lǐng)導(dǎo)權(quán)與獲得領(lǐng)導(dǎo)權(quán)之間應(yīng)該等待的持續(xù)時(shí)間。僅適用于啟用領(lǐng)導(dǎo)者選舉的情況。 | 2s |
| min-resync-period | reflectors 的重新同步周期,在 [MinResyncPeriod-2 * MinResyncPeriod]間取隨機(jī)值。 | 12h0m0s |
| node-monitor-period | 在NodeController中同步NodeStatus的時(shí)間間隔。 | 5s |
| route-reconciliation-period duration | 協(xié)調(diào)由云提供商為節(jié)點(diǎn)創(chuàng)建的路由的時(shí)間段。 | 10s |
| use-service-account-credentials | 如果為true,為每個(gè)控制器使用單個(gè)service account | |
| Service Controller | ======================================================================================================== | ===== |
| concurrent-service-syncs | 允許同時(shí)同步的 service 數(shù)量。 數(shù)字越大=服務(wù)管理響應(yīng)越快,但消耗更多 CPU 和網(wǎng)絡(luò)資源 | 1 |
| 安全服務(wù)參數(shù)(同 apiserver) | ======================================================================================================== | ===== |
| bind-address | 監(jiān)聽(tīng)--secure-port端口的IP地址,接口必須可由集群的其他組件以及CLI / Web客戶端訪問(wèn)。 | 如果空白,全部將使用接口(所有IPv4接口為0.0.0.0,所有IPv6接口為::)。 (默認(rèn)0.0.0.0) |
| cert-dir | TLS證書所在的目錄。如果提供了--tls-cert-file和--tls-private-key-file,則將忽略此標(biāo)志。 | / var / run / kubernetes |
| http2-max-streams-per-connection | api server 提供給 client 在HTTP / 2連接中的最大 stream 數(shù)。0 表示用golang的默認(rèn)值。 | |
| secure-port | 使用身份驗(yàn)證和授權(quán)為HTTPS提供服務(wù)的端口。如果設(shè)為0,禁用HTTPS | 10257 |
| tls-cert-file | 包含HTTPS的默認(rèn)x509證書的文件。 CA證書,如果有的話,在服務(wù)器證書之后連接。如果啟用了HTTPS服務(wù),但是 --tls-cert-file和--tls-private-key-file 未提供,則會(huì)為公共地址生成自簽名證書和密鑰,并將其保存到--cert-dir指定的目錄中。 | |
| tls-cipher-suites | 密碼套件列表。如果省略,將使用默認(rèn)的Go密碼套件。 | |
| tls-min-version | 支持最低TLS版本。 可能的值:VersionTLS10,VersionTLS11,VersionTLS12 | |
| tls-private-key-file | 與 --tls-cert-file 匹配的默認(rèn)x509私鑰。 | |
| tls-sni-cert-key | 一對(duì)x509證書和私鑰文件路徑。示例:“example.crt,example.key” | [] |
| 認(rèn)證參數(shù) | ======================================================================================================== | ===== |
| authentication-kubeconfig | kubeconfig文件指向有權(quán)創(chuàng)建tokenaccessreviews.authentication.k8s.io的kubernetes服務(wù)器。這是可選的。如果是空的,所有令牌請(qǐng)求都被視為匿名,并且不會(huì)在集群中查找客戶端CA | |
| authentication-skip-lookup | 如果為false,則authentication-kubeconfig將用于在集群中查找缺少的身份驗(yàn)證配置。 | |
| authentication-token-webhook-cache-ttl | 緩存來(lái)自webhook令牌驗(yàn)證器的響應(yīng)的持續(xù)時(shí)間。 | 10s |
| client-ca-file | 啟用客戶端證書認(rèn)證。該參數(shù)引用的文件中必須包含一個(gè)或多個(gè)證書頒發(fā)機(jī)構(gòu),用于驗(yàn)證提交給該組件的客戶端證書。如果客戶端證書已驗(yàn)證,則用其中的 Common Name 作為請(qǐng)求的用戶名 | |
| requestheader-allowed-names | 允許通過(guò)的客戶端證書Common Name列表,可以提供 –requestheader-username-headers 中的 Header 的用戶名。如果為空,則所有通過(guò)–requestheader-client-ca-file校驗(yàn)的都允許通過(guò)。 | |
| requestheader-client-ca-file | 針對(duì)收到的請(qǐng)求,在信任--requestheader-username-header指定的header里包含的用戶名之前,驗(yàn)證客戶端證書的根證書。 | |
| requestheader-extra-headers-prefix | 要檢查的請(qǐng)求頭前綴列表。建議使用 X-Remote-Extra- | x-remote-extra- |
| requestheader-group-headers | 要檢查組的請(qǐng)求頭列表。建議采用X-Remote組。 | x-remote-group |
| requestheader-username-headers | 要檢查用戶名的請(qǐng)求標(biāo)頭列表。 X-Remote-User很常見(jiàn)。 | x-remote-user |
| 授權(quán)參數(shù) | ======================================================================================================== | ===== |
| authorization-always-allow-paths | 授權(quán)期間要跳過(guò)的HTTP路徑列表,即,這些路徑是經(jīng)過(guò)授權(quán)、不用與'核心'kubernetes服務(wù)器通信的。 | / healthz |
| authorization-kubeconfig | kubeconfig文件指向 'core' kubernetes服務(wù)器。 這是可選的。 如果是空的,所有未經(jīng)授權(quán)的請(qǐng)求將被拒絕。 | |
| authorization-webhook-cache-authorized-ttl | 緩存 webhook 授權(quán)程序的“授權(quán)”響應(yīng)的持續(xù)時(shí)間。 | 10s |
| authorization-webhook-cache-unauthorized-ttl duration | 緩存 webhook 授權(quán)程序的“未授權(quán)”響應(yīng)的持續(xù)時(shí)間。 | 10s |
| attachdetach controller參數(shù) | ======================================================================================================== | ===== |
| attach-detach-reconcile-sync-period | 卷附加分離間,協(xié)調(diào)程序的同步等待時(shí)間。 此持續(xù)時(shí)間必須大于一秒,并且增加默認(rèn)值可能導(dǎo)致卷與pod不匹配。 | 1m |
| disable-attach-detach-reconcile-sync | 禁用協(xié)調(diào)器同步卷附加分離。禁用此功能可能會(huì)導(dǎo)致卷與 pod 不匹配。 最好用上。 | |
| Csrsigning controller參數(shù) | ======================================================================================================== | ===== |
| cluster-signing-cert-file | 一個(gè)PEM編碼的有X509 CA證書的文件,用于在集群內(nèi)發(fā)布證書 | /etc/kubernetes/ca/ca.pem |
| cluster-signing-key-file | 一個(gè)PEM編碼的有RSA或ECDSA私鑰的文件,用于對(duì)集群內(nèi)的證書進(jìn)行簽名 | /etc/kubernetes/ca/ca.key |
| experimental-cluster-signing-duration | 證書簽名的持續(xù)時(shí)間。 | 8760h0m0s |
| Deployment controller參數(shù) | ======================================================================================================== | ===== |
| concurrent-deployment-syncs | 允許同時(shí)同步的部署對(duì)象的數(shù)量。 數(shù)字越大=部署響應(yīng)越快,但消耗更多 CPU 和網(wǎng)絡(luò)資源 | 5 |
| deployment-controller-sync-period | 同步部署的時(shí)間 | 30s |
| Node controller參數(shù) | ======================================================================================================== | ===== |
| concurrent-endpoint-syncs | 允許同時(shí)執(zhí)行的端點(diǎn)同步操作數(shù)量。數(shù)字越大=部署響應(yīng)越快,但消耗更多 CPU 和網(wǎng)絡(luò)資源 | 5 |
| 垃圾回收器參數(shù) | ======================================================================================================== | ===== |
| concurrent-gc-syncs | 允許同時(shí)同步的垃圾收集器工作器的數(shù)量 | 20 |
| enable-garbage-collector | 啟用通用垃圾收集器。 必須與kube-apiserver的相應(yīng)參數(shù)一起使用。 | true |
| 水平伸縮 pod 參數(shù) | ======================================================================================================== | ===== |
| horizontal-pod-autoscaler-cpu-initialization-period | the period after pod start when CPU samples might be skipped. | 5m |
| horizontal-pod-autoscaler-downscale-stabilization | The period for which autoscaler will look backwards and not scale down below any recommendation it made during that period. | 5m |
| horizontal-pod-autoscaler-initial-readyiness-delay | The period after pod start during which readiness changes will be treated as initial readiness. | 30s |
| horizontal-pod-autoscaler-sync-period duration | 同步horizontal pod autoscaler中pod數(shù)量的間隔。 | 15s |
| horizontal-pod-autoscaler-tolerance | The minimum change (from 1.0) in the desired-to-actual metrics ratio for the horizontal pod autoscaler to consider scaling.(從1.0開(kāi)始)。 | 0.1 |
| Namespace controller 參數(shù) | ======================================================================================================== | ===== |
| concurrent-namespace-syncs | 允許并發(fā)同步的命名空間對(duì)象的數(shù)量。 | 10 |
| namespace-sync-period duration | 同步命名空間生命周期變化的時(shí)間間隔 | 5m |
| Nodeipam controller 參數(shù) | ======================================================================================================== | ===== |
| node-cidr-mask-size | 集群中節(jié)點(diǎn)cidr的掩碼大小。 | 24 |
| service-cluster-ip-range | 集群中服務(wù)的CIDR范圍。 要求--allocate-node-cidrs為true | |
| Nodelifecycle controller 參數(shù) | ======================================================================================================== | ===== |
| enable-taint-manager | 警告:測(cè)試版功能。如果設(shè)置為true,則啟用NoExecute Taints并將逐出所有運(yùn)行在這種 taints 上的不容忍的Pod。 | true |
| large-cluster-size-threshold | NodeController將集群標(biāo)記為 large,以觸發(fā)驅(qū)逐邏輯。--secondary-node-eviction-rate對(duì)于此大小或更小的群集,會(huì)被隱式寫為0 | 50 |
| node-eviction-rate | 當(dāng)Zone 健康&&節(jié)點(diǎn)失敗時(shí),刪除節(jié)點(diǎn)上的pod的速率 | 0.1 |
| node-monitor-grace-period | 在標(biāo)記節(jié)點(diǎn)不健康之前,允許運(yùn)行節(jié)點(diǎn)不響應(yīng)的時(shí)間。必須是kubelet的 nodeStatusUpdateFrequency 的 N 倍,N表示允許kubelet發(fā)布節(jié)點(diǎn)狀態(tài)的重試次數(shù)。 | 40s |
| node-startup-grace-period | 在標(biāo)記節(jié)點(diǎn)不健康之前,允許開(kāi)始節(jié)點(diǎn)不響應(yīng)的時(shí)間。 | 1m |
| pod-eviction-timeout | 刪除故障節(jié)點(diǎn)上的pod的寬限期。 | 5m |
| secondary-node-eviction-rate float32 | 當(dāng) Zone 不健康 && 節(jié)點(diǎn)發(fā)生故障時(shí),刪除節(jié)點(diǎn)上的pod的速率。如果集群大小小于 large-cluster-size-threshold,則隱式地將該值重寫為0。 | 0.01 |
| unhealthy-zone-threshold | not ready 節(jié)點(diǎn)(至少3個(gè))的比例達(dá)到該值時(shí),將 Zone 標(biāo)記為不健康。 | 0.55 |
| Persistentvolume-binder controller 參數(shù) | ======================================================================================================== | ===== |
| enable-dynamic-provisioning | 為支持它的環(huán)境啟用動(dòng)態(tài)配置 | true |
| enable-hostpath-provisioner | 在沒(méi)有云提供商的情況下運(yùn)行時(shí)啟用HostPath PV配置,這僅用于開(kāi)發(fā)和測(cè)試,不適用于多節(jié)點(diǎn)群集。 | |
| flex-volume-plugin-dir | flex卷插件搜索其他第三方卷插件的目錄 | /usr/libexec/kubernetes/kubelet-plugins/volume/exec/ |
| pv-recycler-increment-timeout-nfs | NFS scrubber pod每個(gè)Gi添加到ActiveDeadlineSeconds的時(shí)間增量。 這僅用于開(kāi)發(fā)和測(cè)試,不適用于多節(jié)點(diǎn)群集。 | 30 |
| pv-recycler-minimum-timeout-hostpath | 用于HostPath Recycler pod的最小ActiveDeadlineSeconds。這僅用于開(kāi)發(fā)和測(cè)試,不適用于多節(jié)點(diǎn)群集。 | 60 |
| pv-recycler-minimum-timeout-nfs | 用于NFS Recycler pod的最小ActiveDeadlineSeconds | 300 |
| pv-recycler-pod-template-filepath-hostpath | pod定義的文件路徑,用作HostPath持久卷回收的模板。 這僅用于開(kāi)發(fā)和測(cè)試,不適用于多節(jié)點(diǎn)群集。 | |
| pv-recycler-pod-template-filepath-nfs | pod定義的文件路徑,用作NFS持久卷回收的模板 | |
| pv-recycler-timeout-increment-hostpath | HostPath scrubber pod每個(gè)Gi添加到ActiveDeadlineSeconds的時(shí)間增量。 這僅用于開(kāi)發(fā)和測(cè)試,不適用于多節(jié)點(diǎn)群集。 | 30 |
| pvclaimbinder-sync-period | 同步持久卷和持久卷聲明的時(shí)間段 | 15 |
| Podgc controller 參數(shù) | ======================================================================================================== | ===== |
| terminated-pod-gc-threshold | 已終止pod數(shù)量達(dá)到該值時(shí),terminated pod garbage collector 開(kāi)始刪除已終止的pod。 如果<= 0,則禁用終止的terminated pod garbage collector。 | 12500 |
| ReplicaSet controller 參數(shù) | ======================================================================================================== | ===== |
| concurrent-replicaset-syncs | 并發(fā)執(zhí)行的replica sets集數(shù)。數(shù)量更多=同步操作越快,但消耗更多 CPU 和網(wǎng)絡(luò)資源 | 5 |
| Replication controller 參數(shù) | ======================================================================================================== | ===== |
| concurrent_rc_syncs | 允許同時(shí)同步的replication controllers的數(shù)量。數(shù)量更多=同步操作越快,但消耗更多 CPU 和網(wǎng)絡(luò)資源 | 5 |
| Resourcequota controller 參數(shù) | ======================================================================================================== | ===== |
| concurrent-resource-quota-syncs | 允許同時(shí)同步的resource quotas的數(shù)量。數(shù)量更多=同步操作越快,但消耗更多 CPU 和網(wǎng)絡(luò)資源 | 5 |
| resource-quota-sync-period | 在系統(tǒng)中同步配額使用狀態(tài)的時(shí)間間隔 | 5m |
| serviceaccount controller 參數(shù) | ======================================================================================================== | ===== |
| concurrent-serviceaccount-token-syncs | 允許同時(shí)同步的 service account token 的數(shù)量。數(shù)量更多=同步操作越快,但消耗更多 CPU 和網(wǎng)絡(luò)資源 | 5 |
| root-ca-file | 根 CA 證書文件路徑,將被用于 Service Account 的 token secret 中 | |
| service-account-private-key-file | 用于簽署 service account tokens 的 PEM 編碼的RSA或ECDSA密鑰文件 | |
| Ttl-after-finished controller 參數(shù) | ======================================================================================================== | ===== |
| concurrent-ttl-after-finished-syncs | 允許同時(shí)同步的 TTL-after-finished controller 的數(shù)量。 | 5 |
| 其他參數(shù) | ======================================================================================================== | ===== |
| kubeconfig | 具有授權(quán)和 master 地址信息的 kubeconfig 文件的路徑 | |
| master | Kubernetes API Server 的地址 (覆蓋kubeconfig中的任何值) | |
| 全局參數(shù) (同 API-SERVER) | ======================================================================================================== | ===== |
| alsologtostderr | 日志信息同時(shí)輸出到stderr及文件 | |
| help | 幫助 | |
| log-backtrace-at | 當(dāng)日志命中行文件時(shí):N,觸發(fā)堆棧跟蹤 | 0 |
| log-dir | 如果非空,則在此目錄中寫入日志文件 | |
| log-file | 如果非空,請(qǐng)使用此日志文件 | |
| log-flush-frequency | 日志刷新之間的最大秒數(shù) | 5s |
| logtostderr | 日志信息輸出到stderr 而不是文件 | true |
| skip-headers | 避免在日志消息中使用頭前綴 | |
| stderrthreshold | 等于或高于此閾值的日志發(fā)布到stderr | 2 |
| v | 日志的日志級(jí)別 | |
| version版本 | 打印版本信息并退出 | true |
| vmodule | 模式列表=N文件篩選日志記錄 |