Kubernetes 组件的缺省服务设置
查看 Kubernetes 组件的缺省设置,例如创建集群时 IBM Cloud® Kubernetes Service 设置的 kube-apiserver
,kubelet
,kube-scheduler
或 kube-proxy
。
kube-apiserver
查看 IBM Cloud Kubernetes Service中 kube-apiserver
主组件的缺省设置。
- 缺省 pod 容错
-
default-not-ready-toleration-seconds=600s
-
default-unreachable-toleration-seconds=600s
- 特权 pod
-
allow-privileged=true
- 请求和响应头
-
strict-transport-security-directives="max-age=31536000"
(Kubernetes V 1.28 和更高版本) -
requestheader-client-ca-file=/mnt/etc/kubernetes-cert/ca.pem
-
requestheader-username-headers=X-Remote-User
-
requestheader-group-headers=X-Remote-Group
-
requestheader-extra-headers-prefix=X-Remote-Extra-
- 客户机请求数
-
max-requests-inflight=1600
-
max-mutating-requests-inflight=800
- 许可控制器
-
ClusterTrustBundleAttest
(Kubernetes V 1.27 和更高版本) -
ValidatingAdmissionPolicy
(Kubernetes V 1.27 和更高版本) -
DefaultStorageClass
-
NamespaceLifecycle
-
LimitRanger
-
ServiceAccount
-
MutatingAdmissionWebhook
-
ValidatingAdmissionWebhook
-
ResourceQuota
-
DefaultTolerationSeconds
-
StorageObjectInUseProtection
-
PersistentVolumeClaimResize
-
Priority
-
PodSecurity
(在 Kubernetes V 1.24中可选,在 V 1.25 和更高版本中启用) -
PodSecurityPolicy
(Kubernetes V 1.24 和更低版本) -
NodeRestriction
-
TaintNodesByCondition
-
CertificateApproval
-
CertificateSigning
CertificateSubjectRestriction
DefaultIngressClass
RuntimeClass
DenyServiceExternalIPs
- 功能部件检测点
-
请参阅 功能部件检测点
- TLS 密码支持
-
TLS版本 1.2:
TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256
TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256
-
TLS版本 1.3:
TLS_AES_128_GCM_SHA256
TLS_CHACHA20_POLY1305_SHA256
TLS_AES_256_GCM_SHA384
kube-controller-manager
查看 IBM Cloud Kubernetes Service中 kube-controller-manager
主组件的缺省设置。
- Node 监视器宽限期
-
node-monitor-grace-period=55s
(Kubernetes V 1.28 和更高版本) - 功能部件检测点
-
请参阅 功能部件检测点
- Pod 垃圾回收阈值
-
terminated-pod-gc-threshold=12500
- TLS 密码支持
-
TLS版本 1.2:
TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256
TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256
-
TLS版本 1.3:
TLS_AES_128_GCM_SHA256
TLS_CHACHA20_POLY1305_SHA256
TLS_AES_256_GCM_SHA384
kubelet
查看 IBM Cloud Kubernetes Service中 kubelet
工作程序节点组件的缺省设置。
imageMaximumGCAge: 336h
(Kubernetes版本1.31及更高版本)
imageGCHighThresholdPercent: 75
(Kubernetes V 1.26 和更高版本)
imageGCLowThresholdPercent: 65
(Kubernetes V 1.26 和更高版本)
kubeAPIQPS: 50
(Kubernetes V 1.27 和更高版本)
kubeAPIBurst: 100
(Kubernetes V 1.27 和更高版本)
eventBurst: 100
(Kubernetes V 1.27 和更高版本)
eventRecordQPS: 50
(Kubernetes V 1.27 和更高版本)
serializeImagePulls: false
registryPullQPS: 5
registryBurst: 5
- Cgroups
kubeletCgroups: /podruntime/kubelet
runtime-cgroups=/podruntime/runtime
- 容器日志
containerLogMaxSize: 100Mi
containerLogMaxFiles: 3
- 容器运行时端点
containerRuntimeEndpoint: "unix:///run/containerd/containerd.sock"
- CPU CFS 配额
cpuCFSQuotaPeriod: 20ms
- 功能部件检测点
- 请参阅 功能部件检测点。
- 文件检查频率
fileCheckFrequency: 5s
- 正常 Node 关闭
shutdownGracePeriodCriticalPods: 15s
- Kubernetes 和系统保留
kubeReserved calculated based on worker node flavor
systemReserved calculated based on worker node flavor
驱逐舱
evictionSoft:
memory.available: "100Mi"
nodefs.available: "10%"
imagefs.available: "10%"
nodefs.inodesFree: "10%"
imagefs.inodesFree: "10%"
evictionSoftGracePeriod:
memory.available: "10m"
nodefs.available: "10m"
imagefs.available: "10m"
nodefs.inodesFree: "10m"
imagefs.inodesFree: "10m"
evictionHard:
memory.available: "100Mi"
nodefs.available: "5%"
imagefs.available: "5%"
nodefs.inodesFree: "5%"
imagefs.inodesFree: "5%"
- Pod 清单路径
-
staticPodPath: /etc/kubernetes/manifests
- TLS 密码支持
-
TLS版本 1.2:
TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256
TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256
-
TLS版本 1.3:
TLS_AES_128_GCM_SHA256
TLS_CHACHA20_POLY1305_SHA256
TLS_AES_256_GCM_SHA384
kube-scheduler
查看 IBM Cloud Kubernetes Service中 kube-scheduler
工作程序节点组件的缺省设置。
- TLS 密码支持
-
TLS版本 1.2:
TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256
TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256
-
TLS版本 1.3:
TLS_AES_128_GCM_SHA256
TLS_CHACHA20_POLY1305_SHA256
TLS_AES_256_GCM_SHA384
kube-proxy
查看 IBM Cloud Kubernetes Service中 kube-proxy
工作程序节点组件的缺省设置。
- Iptable 设置
iptables-sync-period 120
(Kubernetes V 1.29 和更高版本)iptables-min-sync-period 2s
(Kubernetes V 1.29 和更高版本)iptables-sync-period 180s
(Kubernetes V 1.28)iptables-min-sync-period 3s
(Kubernetes V 1.28)iptables-sync-period 300s
(Kubernetes V 1.27 和更低版本)iptables-min-sync-period 5s
(Kubernetes V 1.27 和更低版本)iptables-localhost-nodeports false
(Kubernetes V 1.26 和更高版本)- 代理方式
proxy-mode=iptables
- 功能部件检测点
- 请参阅 功能部件检测点
功能部件检测点
查看缺省情况下应用于 IBM Cloud Kubernetes Service 集群中所有主节点和工作程序节点组件的功能检测点。 这些功能检测点与在社区分发中设置的功能检测点不同。 在 Kubernetes中,缺省情况下会禁用大多数新的 Beta 功能。 在所有版本中都禁用了可更改的 alpha 功能。
您可以使用 kubectl get --raw /metrics | grep kubernetes_feature_enabled
命令来确定功能门是否启用或禁用。
- 1.32
CustomCPUCFSQuotaPeriod=true
- 1.31
CustomCPUCFSQuotaPeriod=true
StrictCostEnforcementForVAP=true
StrictCostEnforcementForWebhooks=true
- 1.30
CustomCPUCFSQuotaPeriod=true
StrictCostEnforcementForVAP=true
StrictCostEnforcementForWebhooks=true
- 1.29
CustomCPUCFSQuotaPeriod=true
KMSv1=true
StructuredAuthenticationConfiguration=true
- 1.28
CustomCPUCFSQuotaPeriod=true
UnauthenticatedHTTP2DOSMitigation=true
- 1.27
CustomCPUCFSQuotaPeriod=true
UnauthenticatedHTTP2DOSMitigation=true
- 1.26
CustomCPUCFSQuotaPeriod=true
UnauthenticatedHTTP2DOSMitigation=true
- 1.25
CustomCPUCFSQuotaPeriod=true
UnauthenticatedHTTP2DOSMitigation=true
- 1.24
CustomCPUCFSQuotaPeriod=true
LegacyServiceAccountTokenNoAutoGeneration=false
PodSecurity=false
- 1.23
CustomCPUCFSQuotaPeriod=true
ServiceLBNodePortControl=false
PodSecurity=false
- 1.22
ServiceLBNodePortControl=false
CustomCPUCFSQuotaPeriod=true
IPv6DualStack=false
- 1.21
ServiceLoadBalancerClass=true
CustomCPUCFSQuotaPeriod=true
IPv6DualStack=false
- 1.20
AllowInsecureBackendProxy=false
CustomCPUCFSQuotaPeriod=true
- 1.19
RuntimeClass=false
CustomCPUCFSQuotaPeriod=true
AllowInsecureBackendProxy=false
SCTPSupport=false
ServiceAppProtocol=false
- 1.18
RuntimeClass=false
CustomCPUCFSQuotaPeriod=true
AllowInsecureBackendProxy=false