Configurações de serviço padrão para componentes do Kubernetes

Revise as configurações padrão para componentes do Kubernetes, como o kube-apiserver, o kubelet, o kube-scheduler ou o kube-proxy, que o IBM Cloud® Kubernetes Service configura quando você cria o seu cluster.

kube-apiserver

Revise as configurações padrão para o componente principal kube-apiserver no IBM Cloud Kubernetes Service.

Tolerâncias de pod padrão

default-not-ready-toleration-seconds=600s

default-unreachable-toleration-seconds=600s

Pods privilegiados

allow-privileged=true

Cabeçalhos de solicitação e de resposta

strict-transport-security-directives="max-age=31536000" (Kubernetes versão 1.28 e mais recente)

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-

Número de solicitações do cliente

max-requests-inflight=1600

max-mutating-requests-inflight=800

Controladores de admissão

ClusterTrustBundleAttest (Kubernetes versão 1.27 e mais recente)

ValidatingAdmissionPolicy (Kubernetes versão 1.27 e mais recente)

DefaultStorageClass

NamespaceLifecycle

LimitRanger

ServiceAccount

MutatingAdmissionWebhook

ValidatingAdmissionWebhook

ResourceQuota

DefaultTolerationSeconds

StorageObjectInUseProtection

PersistentVolumeClaimResize

Priority

PodSecurity (Opcional no Kubernetes versão 1.24, ativado na versão 1.25 e posterior)

PodSecurityPolicy (Kubernetes versão 1.24 e anterior)

NodeRestriction

TaintNodesByCondition

CertificateApproval

CertificateSigning

  • CertificateSubjectRestriction
  • DefaultIngressClass
  • RuntimeClass
  • DenyServiceExternalIPs
Portas de recurso

Consulte Portas de recurso

Suporte à cifra do TLS

TLS versão 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 versão 1.3:

  • TLS_AES_128_GCM_SHA256
  • TLS_CHACHA20_POLY1305_SHA256
  • TLS_AES_256_GCM_SHA384

kube-controller-manager

Revise as configurações padrão para o componente principal kube-controller-manager no IBM Cloud Kubernetes Service.

Período de carência do monitor do Node

node-monitor-grace-period=55s (Kubernetes versão 1.28 e mais recente)

Portas de recurso

Consulte Portas de recurso

Limite de coleta de lixo do pod

terminated-pod-gc-threshold=12500

Suporte à cifra do TLS

TLS versão 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 versão 1.3:

  • TLS_AES_128_GCM_SHA256
  • TLS_CHACHA20_POLY1305_SHA256
  • TLS_AES_256_GCM_SHA384

kubelet

Revise as configurações padrão para o componente do nó do trabalhador kubelet no IBM Cloud Kubernetes Service.

imageMaximumGCAge: 336h (Kubernetes versão 1.31 e posterior)

imageGCHighThresholdPercent: 75 (Kubernetes versão 1.26 e mais recente)

imageGCLowThresholdPercent: 65 (Kubernetes versão 1.26 e mais recente)

kubeAPIQPS: 50 (Kubernetes versão 1.27 e mais recente)

kubeAPIBurst: 100 (Kubernetes versão 1.27 e mais recente)

eventBurst: 100 (Kubernetes versão 1.27 e mais recente)

eventRecordQPS: 50 (Kubernetes versão 1.27 e mais recente)

serializeImagePulls: false

registryPullQPS: 5

registryBurst: 5

cgroups
kubeletCgroups: /podruntime/kubelet
runtime-cgroups=/podruntime/runtime
Logs do contêiner
containerLogMaxSize: 100Mi
containerLogMaxFiles: 3
Terminal de tempo de execução do contêiner
containerRuntimeEndpoint: "unix:///run/containerd/containerd.sock"
Cota de CFS da CPU
cpuCFSQuotaPeriod: 20ms
Portas de recurso
Consulte Portas de recurso.
Frequência de verificação de arquivo
fileCheckFrequency: 5s
Encerramento normal do nó
shutdownGracePeriodCriticalPods: 15s
Kubernetes e reservas do sistema
kubeReserved calculated based on worker node flavor
systemReserved calculated based on worker node flavor

Despejo de pod

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%"
Caminho do manifest do pod

staticPodPath: /etc/kubernetes/manifests

Suporte à cifra do TLS

TLS versão 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 versão 1.3:

  • TLS_AES_128_GCM_SHA256
  • TLS_CHACHA20_POLY1305_SHA256
  • TLS_AES_256_GCM_SHA384

kube-scheduler

Revise as configurações padrão para o componente do nó do trabalhador kube-scheduler no IBM Cloud Kubernetes Service.

Suporte à cifra do TLS

TLS versão 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 versão 1.3:

  • TLS_AES_128_GCM_SHA256
  • TLS_CHACHA20_POLY1305_SHA256
  • TLS_AES_256_GCM_SHA384

kube-proxy

Revise as configurações padrão para o componente do nó do trabalhador kube-proxy no IBM Cloud Kubernetes Service.

Configurações do Iptable
iptables-sync-period 120 (Kubernetes versão 1.29 e mais recente)
iptables-min-sync-period 2s (Kubernetes versão 1.29 e mais recente)
iptables-sync-period 180s (Kubernetes versão 1.28)
iptables-min-sync-period 3s (Kubernetes versão 1.28)
iptables-sync-period 300s (Kubernetes versão 1.27 e anterior)
iptables-min-sync-period 5s (Kubernetes versão 1.27 e anterior)
iptables-localhost-nodeports false (Kubernetes versões 1.26 e mais recente)
Modo de proxy
proxy-mode=iptables
Portas de recurso
Consulte Portas de recurso

Portas de recurso

Revise as portas de recurso que são aplicadas a todos os componentes do nó principal e do trabalhador por padrão em clusters do IBM Cloud Kubernetes Service. Essas portas de recurso diferem das que são configuradas em distribuições da comunidade. No Kubernetes, a maioria dos novos recursos beta está desativada por padrão. Os recursos da versão alfa, que estão sujeitos a alterações, estão desativados em todas as versões.

Você pode usar o comando kubectl get --raw /metrics | grep kubernetes_feature_enabled para determinar se uma porta de recurso está ativada ou desativada.

1.36
UnauthenticatedHTTP2DOSMitigation=true
1.35
UnauthenticatedHTTP2DOSMitigation=true
DisableNodeKubeProxyVersion=false
1.34
CustomCPUCFSQuotaPeriod=true
DisableNodeKubeProxyVersion=false
1.33
CustomCPUCFSQuotaPeriod=true
DisableNodeKubeProxyVersion=false
1.32
CustomCPUCFSQuotaPeriod=true
1.31
CustomCPUCFSQuotaPeriod=true
StrictCostEnforcementForVAP=true
StrictCostEnforcementForWebhooks=true
1.30
CustomCPUCFSQuotaPeriod=true
StrictCostEnforcementForVAP=true
StrictCostEnforcementForWebhooks=true