IBM Cloud Docs
Kubernetes 컴포넌트에 대한 기본 서비스 설정

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 버전 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 버전 1.27 이상)

ValidatingAdmissionPolicy (Kubernetes 버전 1.27 이상)

DefaultStorageClass

NamespaceLifecycle

LimitRanger

ServiceAccount

MutatingAdmissionWebhook

ValidatingAdmissionWebhook

ResourceQuota

DefaultTolerationSeconds

StorageObjectInUseProtection

PersistentVolumeClaimResize

Priority

PodSecurity ( Kubernetes 버전 1.24에서 선택사항, 버전 1.25 이상에서 사용됨)

PodSecurityPolicy (Kubernetes 버전 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 버전 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 버전 1.26 이상)

imageGCLowThresholdPercent: 65 (Kubernetes 버전 1.26 이상)

kubeAPIQPS: 50 (Kubernetes 버전 1.27 이상)

kubeAPIBurst: 100 (Kubernetes 버전 1.27 이상)

eventBurst: 100 (Kubernetes 버전 1.27 이상)

eventRecordQPS: 50 (Kubernetes 버전 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
단계적 노드 종료
shutdownGracePeriodCriticalPods: 15s
Kubernetes 및 시스템 예약
kubeReserved calculated based on worker node flavor
systemReserved calculated based on worker node flavor

팟(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%"
팟(Pod) Manifest 경로

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 버전 1.29 이상)
iptables-min-sync-period 2s (Kubernetes 버전 1.29 이상)
iptables-sync-period 180s (Kubernetes 버전 1.28)
iptables-min-sync-period 3s (Kubernetes 버전 1.28)
iptables-sync-period 300s (Kubernetes 버전 1.27 이하)
iptables-min-sync-period 5s (Kubernetes 버전 1.27 이하)
iptables-localhost-nodeports false (Kubernetes 버전 1.26 이상)
프록시 모드
proxy-mode=iptables
기능 게이트
기능 게이트 참조

기능 게이트

기본적으로 IBM Cloud Kubernetes Service 클러스터에서 모든 마스터 및 작업자 노드 컴포넌트에 적용된 기능 게이트를 검토합니다. 이 기능 게이트는 커뮤니티 분배에 설정된 것과는 다릅니다. Kubernetes에서는 대부분의 새 베타 기능이 기본적으로 사용 안함으로 설정되어 있습니다. 변경될 수 있는 알파 기능은 모든 버전에서 비활성화되어 있습니다.

사용할 수 있습니다 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