리소스 requests 및 limits 설정하기
리소스 requests 및 limits 설정하기 (Configure resource requests and limits)
이 문서는 Calico Enterprise 컴포넌트에 Kubernetes 리소스 requests와 limits를 설정하는 방법을 정리한 레퍼런스예요. 커스텀 리소스(CR)를 kubectl patch로 패치하는 방법과 Helm 차트로 설치 시점에 설정하는 방법을 예시 명령과 함께 차근차근 살펴볼게요. 컴포넌트별 예시가 많지만 구조가 비슷하니 하나만 익히면 나머지도 금방 따라 할 수 있어요.
출처: 문서
본문
큰 그림 (Big picture)
리소스 requests와 limits는 리소스 할당을 관리하고 Kubernetes 워크로드의 최적 성능을 보장하기 위한 필수 설정이에요. Calico Enterprise에서는 이 설정을 커스텀 리소스로 커스터마이징해 특정 요구 사항을 충족하고 리소스 활용도를 최적화할 수 있어요.
보조 설명(SECONDARY): 예시에서 사용하는 CPU와 메모리 값은 시연용이며, 개별 시스템 요구 사항에 맞게 조정해야 해요. 컴포넌트에 적용 가능한 전체 컨테이너 목록은 해당 컴포넌트의 스펙(specification)을 참고하세요.
APIServer 커스텀 리소스 (APIServer custom resource)
APIServer CR은 APIServerDeployment를 설정할 수 있는 방법을 제공해요. 다음 섹션에서 이 CR의 예시 설정을 보여 줄게요.
APIServerDeployment
APIServerDeployment의 리소스 명세를 설정하려면 아래 명령으로 APIServer CR을 패치하세요:
kubectl patch apiserver tigera-secure --type=merge --patch='{"spec": {"apiServerDeployment":{"spec": {"template": {"spec": {"containers":[{"name":"calico-apiserver","resources":{"limits":{"cpu":"1", "memory":"1000Mi"},"requests":{"cpu":"100m", "memory":"100Mi"}}},{"name":"tigera-queryserver","resources":{"limits":{"cpu":"1", "memory":"1000Mi"},"requests":{"cpu":"100m", "memory":"100Mi"}}}]}}}}}}'
이 명령은 CPU request를 100 밀리CPU(mCPU), 메모리 request를 100 메비바이트(MiB)로 설정하고, CPU limit을 1 CPU, 메모리 limit을 1000 메비바이트(MiB)로 설정해요.
검증 (Verification)
다음 명령으로 설정된 리소스를 확인할 수 있어요:
kubectl get deployment.apps/calico-apiserver -n calico-system -o json | jq '.spec.template.spec.containers[] | {name: .name, resources: .resources}'
이 명령은 Calico APIServerDeployment 컴포넌트의 설정된 리소스 requests와 limits를 JSON 형식으로 출력해요.
{
"name": "calico-apiserver",
"resources": {
"limits": {
"cpu": "1",
"memory": "1000Mi"
},
"requests": {
"cpu": "100m",
"memory": "100Mi"
}
}
}
{
"name": "tigera-queryserver",
"resources": {
"limits": {
"cpu": "1",
"memory": "1000Mi"
},
"requests": {
"cpu": "100m",
"memory": "100Mi"
}
}
}
ApplicationLayer 커스텀 리소스 (ApplicationLayer custom resource)
ApplicationLayer CR은 L7LogCollectorDaemonSet의 리소스를 설정할 수 있는 방법을 제공해요. 다음 섹션에서 이 CR의 예시 설정을 보여 줄게요.
L7LogCollectorDaemonSet
L7LogCollectorDaemonSet의 리소스 명세를 설정하려면 아래 명령으로 ApplicationLayer CR을 패치하세요:
kubectl patch applicationlayer tigera-secure --type=merge --patch='{"spec": {"l7LogCollectorDaemonSet":{"spec": {"template": {"spec": {"containers":[{"name":"l7-collector","resources":{"limits":{"cpu":"1", "memory":"1000Mi"},"requests":{"cpu":"100m", "memory":"100Mi"}}},{"name":"envoy-proxy","resources":{"limits":{"cpu":"1", "memory":"1000Mi"},"requests":{"cpu":"100m", "memory":"100Mi"}}}]}}}}}}'
이 명령은 CPU request를 100 밀리CPU(mCPU), 메모리 request를 100 메비바이트(MiB)로 설정하고, CPU limit을 1 CPU, 메모리 limit을 1000 메비바이트(MiB)로 설정해요.
검증 (Verification)
다음 명령으로 설정된 리소스를 확인할 수 있어요:
kubectl get daemonset.apps/l7-log-collector -n calico-system -o json | jq '.spec.template.spec.containers[] | {name: .name, resources: .resources}'
이 명령은 Calico L7LogCollectorDaemonSet 컴포넌트의 설정된 리소스 requests와 limits를 JSON 형식으로 출력해요.
{
"name": "envoy-proxy",
"resources": {
"limits": {
"cpu": "1",
"memory": "1000Mi"
},
"requests": {
"cpu": "100m",
"memory": "100Mi"
}
}
}
{
"name": "l7-collector",
"resources": {
"limits": {
"cpu": "1",
"memory": "1000Mi"
},
"requests": {
"cpu": "100m",
"memory": "100Mi"
}
}
}
Authentication 커스텀 리소스 (Authentication custom resource)
Authentication CR은 DexDeployment의 리소스를 설정할 수 있는 방법을 제공해요. 다음 섹션에서 이 CR의 예시 설정을 보여 줄게요.
DexDeployment
DexDeployment의 리소스 명세를 설정하려면 아래 명령으로 Authentication CR을 패치하세요:
kubectl patch authentication tigera-secure --type=merge --patch='{"spec": {"dexDeployment":{"spec": {"template": {"spec": {"containers":[{"name":"tigera-dex","resources":{"limits":{"cpu":"1", "memory":"1000Mi"},"requests":{"cpu":"100m", "memory":"100Mi"}}}]}}}}}}'
이 명령은 CPU request를 100 밀리CPU(mCPU), 메모리 request를 100 메비바이트(MiB)로 설정하고, CPU limit을 1 CPU, 메모리 limit을 1000 메비바이트(MiB)로 설정해요.
검증 (Verification)
다음 명령으로 설정된 리소스를 확인할 수 있어요:
kubectl get deployment.apps/tigera-dex -n tigera-dex -o json | jq '.spec.template.spec.containers[] | {name: .name, resources: .resources}'
이 명령은 Calico DexDeployment 컴포넌트의 설정된 리소스 requests와 limits를 JSON 형식으로 출력해요.
{
"name": "tigera-dex",
"resources": {
"limits": {
"cpu": "1",
"memory": "1000Mi"
},
"requests": {
"cpu": "100m",
"memory": "100Mi"
}
}
}
Compliance 커스텀 리소스 (Compliance custom resource)
Compliance CR은 ComplianceControllerDeployment, ComplianceSnapshotterDeployment, ComplianceBenchmarkerDaemonSet, ComplianceServerDeployment, ComplianceReporterPodTemplate의 리소스를 설정할 수 있는 방법을 제공해요. 다음 섹션에서 이 CR의 예시 설정을 보여 줄게요.
예시 설정:
ComplianceControllerDeployment
ComplianceControllerDeployment의 리소스 명세를 설정하려면 아래 명령으로 Compliance CR을 패치하세요:
kubectl patch compliance tigera-secure --type=merge --patch='{"spec": {"complianceControllerDeployment":{"spec": {"template": {"spec": {"containers":[{"name":"compliance-controller","resources":{"limits":{"cpu":"1", "memory":"1000Mi"},"requests":{"cpu":"100m", "memory":"100Mi"}}}]}}}}}}'
이 명령은 CPU request를 100 밀리CPU(mCPU), 메모리 request를 100 메비바이트(MiB)로 설정하고, CPU limit을 1 CPU, 메모리 limit을 1000 메비바이트(MiB)로 설정해요.
검증 (Verification)
다음 명령으로 설정된 리소스를 확인할 수 있어요:
kubectl get deployment.apps/compliance-controller -n tigera-compliance -o json|jq '.spec.template.spec.containers[] | {name: .name, resources: .resources}'
이 명령은 ComplianceControllerDeployment 컴포넌트의 설정된 리소스 requests와 limits를 JSON 형식으로 출력해요.
{
"name": "compliance-controller",
"resources": {
"limits": {
"cpu": "1",
"memory": "1000Mi"
},
"requests": {
"cpu": "100m",
"memory": "100Mi"
}
}
}
ComplianceSnapshotterDeployment
ComplianceSnapshotterDeployment의 리소스 명세를 설정하려면 아래 명령으로 Compliance CR을 패치하세요:
kubectl patch compliance tigera-secure --type=merge --patch='{"spec": {"complianceSnapshotterDeployment":{"spec": {"template": {"spec": {"containers":[{"name":"compliance-snapshotter","resources":{"limits":{"cpu":"1", "memory":"1000Mi"},"requests":{"cpu":"100m", "memory":"100Mi"}}}]}}}}}}'
이 명령은 CPU request를 100 밀리CPU(mCPU), 메모리 request를 100 메비바이트(MiB)로 설정하고, CPU limit을 1 CPU, 메모리 limit을 1000 메비바이트(MiB)로 설정해요.
검증 (Verification)
다음 명령으로 설정된 리소스를 확인할 수 있어요:
kubectl get deployment.apps/compliance-snapshotter -n tigera-compliance -o json|jq '.spec.template.spec.containers[] | {name: .name, resources: .resources}'
이 명령은 ComplianceSnapshotterDeployment의 설정된 리소스 requests와 limits를 JSON 형식으로 출력해요.
{
"name": "compliance-snapshotter",
"resources": {
"limits": {
"cpu": "1",
"memory": "1000Mi"
},
"requests": {
"cpu": "100m",
"memory": "100Mi"
}
}
}
ComplianceBenchmarkerDaemonSet
ComplianceBenchmarkerDaemonSet의 리소스 명세를 설정하려면 아래 명령으로 Compliance CR을 패치하세요:
kubectl patch compliance tigera-secure --type=merge --patch='{"spec": {"complianceBenchmarkerDaemonSet":{"spec": {"template": {"spec": {"containers":[{"name":"compliance-benchmarker","resources":{"limits":{"cpu":"1", "memory":"1000Mi"},"requests":{"cpu":"100m", "memory":"100Mi"}}}]}}}}}}'
이 명령은 CPU request를 100 밀리CPU(mCPU), 메모리 request를 100 메비바이트(MiB)로 설정하고, CPU limit을 1 CPU, 메모리 limit을 1000 메비바이트(MiB)로 설정해요.
검증 (Verification)
다음 명령으로 설정된 리소스를 확인할 수 있어요:
kubectl get daemonset.apps/compliance-benchmarker -n tigera-compliance -o json |jq '.spec.template.spec.containers[] | {name: .name, resources: .resources}'
{
"name": "compliance-benchmarker",
"resources": {
"limits": {
"cpu": "1",
"memory": "1000Mi"
},
"requests": {
"cpu": "100m",
"memory": "100Mi"
}
}
}
이 명령은 ComplianceBenchmarkerDaemonSet의 설정된 리소스 requests와 limits를 JSON 형식으로 출력해요.
ComplianceServerDeployment
ComplianceServerDeployment의 리소스 명세를 설정하려면 아래 명령으로 Compliance CR을 패치하세요:
kubectl patch compliance tigera-secure --type=merge --patch='{"spec": {"complianceServerDeployment":{"spec": {"template": {"spec": {"containers":[{"name":"compliance-server","resources":{"limits":{"cpu":"1", "memory":"1000Mi"},"requests":{"cpu":"100m", "memory":"100Mi"}}}]}}}}}}'
이 명령은 CPU request를 100 밀리CPU(mCPU), 메모리 request를 100 메비바이트(MiB)로 설정하고, CPU limit을 1 CPU, 메모리 limit을 1000 메비바이트(MiB)로 설정해요.
검증 (Verification)
다음 명령으로 설정된 리소스를 확인할 수 있어요:
kubectl get deployment.apps/compliance-server -n tigera-compliance -o json| jq '.spec.template.spec.containers[] | {name: .name, resources: .resources}'
이 명령은 ComplianceServerDeployment의 설정된 리소스 requests와 limits를 JSON 형식으로 출력해요.
{
"name": "compliance-server",
"resources": {
"limits": {
"cpu": "1",
"memory": "1000Mi"
},
"requests": {
"cpu": "100m",
"memory": "100Mi"
}
}
}
ComplianceReporterPodTemplate.
ComplianceReporterPodTemplate의 리소스 명세를 설정하려면 아래 명령으로 Compliance CR을 패치하세요:
kubectl patch compliance tigera-secure --type=merge --patch='{"spec": {"complianceReporterPodTemplate": {"template": {"spec": {"containers":[{"name":"reporter","resources":{"limits":{"cpu":"1", "memory":"1000Mi"},"requests":{"cpu":"100m", "memory":"100Mi"}}}]}}}}}'
이 명령은 CPU request를 100 밀리CPU(mCPU), 메모리 request를 100 메비바이트(MiB)로 설정하고, CPU limit을 1 CPU, 메모리 limit을 1000 메비바이트(MiB)로 설정해요.
검증 (Verification)
다음 명령으로 설정된 리소스를 확인할 수 있어요:
kubectl get Podtemplates tigera.io.report -n tigera-compliance -o json | jq '.template.spec.containers[] | {name: .name, resources: .resources}'
이 명령은 ComplianceReporterPodTemplate 컴포넌트의 설정된 리소스 requests와 limits를 JSON 형식으로 출력해요.
{
"name": "reporter",
"resources": {
"limits": {
"cpu": "1",
"memory": "1000Mi"
},
"requests": {
"cpu": "100m",
"memory": "100Mi"
}
}
}
Installation 커스텀 리소스 (Installation custom resource)
Installation CR은 TyphaDeployment, calicoNodeDaemonSet, CalicoNodeWindowsDaemonSet, csiNodeDriverDaemonSet, KubeControllersDeployment를 포함한 다양한 Calico Enterprise 컴포넌트의 리소스를 설정할 수 있는 방법을 제공해요. 다음 섹션에서 이 CR의 예시 설정을 보여 줄게요.
TyphaDeployment
TyphaDeployment의 리소스 명세를 설정하려면 아래 명령으로 installation CR을 패치하세요:
kubectl patch installations default --type=merge --patch='{"spec": {"typhaDeployment": {"spec": {"template": {"spec": {"containers": [{"name": "calico-typha", "resources": {"requests": {"cpu": "100m", "memory": "100Mi"}, "limits": {"cpu": "1", "memory": "1000Mi"}}}]}}}}}}'
이 명령은 CPU request를 100 밀리CPU(mCPU), 메모리 request를 100 메비바이트(MiB)로 설정하고, CPU limit을 1 CPU, 메모리 limit을 1000 메비바이트(MiB)로 설정해요.
검증 (Verification)
다음 명령으로 설정된 리소스를 확인할 수 있어요:
kubectl get deployment.apps/calico-typha -n calico-system -o json | jq '.spec.template.spec.containers[]| {name:.name,resources:.resources}'
이 명령은 Calico TyphaDeployment 컴포넌트의 설정된 리소스 requests와 limits를 JSON 형식으로 출력해요.
{
"name": "calico-typha",
"resources": {
"limits": {
"cpu": "1",
"memory": "1000Mi"
},
"requests": {
"cpu": "100m",
"memory": "100Mi"
}
}
}
CalicoNodeDaemonSet
calicoNodeDaemonSet 컴포넌트의 리소스 requests를 설정하려면 아래 명령으로 installation CR을 패치하세요:
kubectl patch installations default --type=merge --patch='{"spec": {"calicoNodeDaemonSet":{"spec": {"template": {"spec": {"containers":[{"name":"calico-node","resources":{"requests":{"cpu":"100m", "memory":"100Mi"}, "limits":{"cpu":"1", "memory":"1000Mi"}}}]}}}}}}'
이 명령은 CPU request를 100 밀리CPU(mCPU), 메모리 request를 100 메비바이트(MiB)로 설정하고, CPU limit을 1 CPU, 메모리 limit을 1000 메비바이트(MiB)로 설정해요.
검증 (Verification)
다음 명령으로 설정된 리소스를 확인할 수 있어요:
kubectl get daemonset.apps/calico-node -n calico-system -o json | jq '.spec.template.spec.containers[]| {name:.name,resources:.resources}'
이 명령은 Calico calicoNodeDaemonSet 컴포넌트의 설정된 리소스 requests와 limits를 JSON 형식으로 출력해요.
{
"name": "calico-node",
"resources": {
"limits": {
"cpu": "1",
"memory": "1000Mi"
},
"requests": {
"cpu": "100m",
"memory": "100Mi"
}
}
}
calicoNodeWindowsDaemonSet
calicoNodeWindowsDaemonSet 컴포넌트의 리소스 requests를 설정하려면 아래 명령으로 installation CR을 패치하세요:
kubectl patch installations default --type=merge --patch='{"spec": {"calicoNodeWindowsDaemonSet":{"spec": {"template": {"spec": {"containers":[{"name":"calico-node-windows","resources":{"requests":{"cpu":"100m", "memory":"100Mi"}, "limits":{"cpu":"1", "memory":"1000Mi"}}}]}}}}}}'
이 명령은 CPU request를 100 밀리CPU(mCPU), 메모리 request를 100 메비바이트(MiB)로 설정하고, CPU limit을 1 CPU, 메모리 limit을 1000 메비바이트(MiB)로 설정해요.
검증 (Verification)
다음 명령으로 설정된 리소스를 확인할 수 있어요:
kubectl get daemonset.apps/calico-node -n calico-system -o json | jq '.spec.template.spec.containers[]| {name:.name,resources:.resources}'
이 명령은 Calico calicoNodeWindowsDaemonSet 컴포넌트의 설정된 리소스 requests와 limits를 JSON 형식으로 출력해요.
{
"name": "calico-node",
"resources": {
"limits": {
"cpu": "1",
"memory": "1000Mi"
},
"requests": {
"cpu": "100m",
"memory": "100Mi"
}
}
}
CalicoKubeControllersDeployment
CalicoKubeControllersDeployment 컴포넌트의 리소스 requests를 설정하려면 아래 명령으로 installation CR을 패치하세요:
kubectl patch installations default --type=merge --patch='{"spec": {"calicoKubeControllersDeployment":{"spec": {"template": {"spec": {"containers":[{"name":"calico-kube-controllers","resources":{"requests":{"cpu":"100m", "memory":"100Mi"}, "limits":{"cpu":"1", "memory":"1000Mi"}}}]}}}}}}'
이 명령은 CPU request를 100 밀리CPU(mCPU), 메모리 request를 100 메비바이트(MiB)로 설정하고, CPU limit을 1 CPU, 메모리 limit을 1000 메비바이트(MiB)로 설정해요.
검증 (Verification)
다음 명령으로 설정된 리소스를 확인할 수 있어요:
kubectl get deployment.apps/calico-kube-controllers -n calico-system -o json | jq '.spec.template.spec.containers[]| {name:.name,resources:.resources}'
이 명령은 Calico CalicoKubeControllersDeployment 컴포넌트의 설정된 리소스 requests와 limits를 JSON 형식으로 출력해요.
{
"name": "calico-kube-controllers",
"resources": {
"limits": {
"cpu": "1",
"memory": "1000Mi"
},
"requests": {
"cpu": "100m",
"memory": "100Mi"
}
}
}
CSINodeDriverDaemonSet
CSINodeDriverDaemonSet 컴포넌트의 리소스 requests를 설정하려면 아래 명령으로 installation CR을 패치하세요:
kubectl patch installations default --type=merge --patch='{"spec": {"csiNodeDriverDaemonSet":{"spec": {"template": {"spec": {"containers":[{"name":"calico-csi","resources":{"requests":{"cpu":"100m", "memory":"100Mi"}, "limits":{"cpu":"1", "memory":"1000Mi"}}},{"name":"csi-node-driver-registrar","resources":{"requests":{"cpu":"50m", "memory":"50Mi"}, "limits":{"cpu":"1", "memory":"1000Mi"}}}]}}}}}}'
이 명령은 CPU request를 100 밀리CPU(mCPU), 메모리 request를 100 메비바이트(MiB)로 설정하고, CPU limit을 1 CPU, 메모리 limit을 1000 메비바이트(MiB)로 설정해요.
검증 (Verification)
다음 명령으로 설정된 리소스를 확인할 수 있어요:
kubectl get daemonset.apps/csi-node-driver -n calico-system -o json | jq '.spec.template.spec.containers[]| {name:.name,resources:.resources}'
이 명령은 Calico calicoNodeDaemonSet 컴포넌트의 설정된 리소스 requests와 limits를 JSON 형식으로 출력해요.
{
"name": "calico-csi",
"resources": {
"limits": {
"cpu": "1",
"memory": "1000Mi"
},
"requests": {
"cpu": "100m",
"memory": "100Mi"
}
}
}
{
"name": "csi-node-driver-registrar",
"resources": {
"limits": {
"cpu": "1",
"memory": "1000Mi"
},
"requests": {
"cpu": "50m",
"memory": "50Mi"
}
}
}
IntrusionDetection 커스텀 리소스 (IntrusionDetection custom resource)
IntrusionDetection CR은 IntrusionDetectionControllerDeployment의 리소스를 설정할 수 있는 방법을 제공해요. 다음 섹션에서 이 CR의 예시 설정을 보여 줄게요.
IntrusionDetectionControllerDeployment.
IntrusionDetectionControllerDeployment의 리소스 명세를 설정하려면 아래 명령으로 IntrusionDetection CR을 패치하세요:
kubectl patch intrusiondetection tigera-secure --type=merge --patch='{"spec": {"intrusionDetectionControllerDeployment":{"spec": {"template": {"spec": {"containers":[{"name":"webhooks-processor","resources":{"limits":{"cpu":"1", "memory":"1000Mi"},"requests":{"cpu":"100m", "memory":"1000Mi"}}},{"name":"controller","resources":{"limits":{"cpu":"1", "memory":"1000Mi"},"requests":{"cpu":"100m", "memory":"1000Mi"}}}]}}}}}}'
이 명령은 CPU request를 100 밀리CPU(mCPU), 메모리 request를 100 메비바이트(MiB)로 설정하고, CPU limit을 1 CPU, 메모리 limit을 1000 메비바이트(MiB)로 설정해요.
검증 (Verification)
다음 명령으로 설정된 리소스를 확인할 수 있어요:
kubectl get deployment.apps/intrusion-detection-controller -n tigera-intrusion-detection -o json|jq '.spec.template.spec.containers[] | {name: .name, resources: .resources}'
이 명령은 IntrusionDetectionControllerDeployment의 설정된 리소스 requests와 limits를 JSON 형식으로 출력해요.
{
"name": "controller",
"resources": {
"limits": {
"cpu": "1",
"memory": "1000Mi"
},
"requests": {
"cpu": "100m",
"memory": "1000Mi"
}
}
}
{
"name": "webhooks-processor",
"resources": {
"limits": {
"cpu": "1",
"memory": "1000Mi"
},
"requests": {
"cpu": "100m",
"memory": "1000Mi"
}
}
}
LogCollector 커스텀 리소스 (LogCollector custom resource)
LogCollector CR은 FluentdDaemonSet, EKSLogForwarderDeployment의 리소스를 설정할 수 있는 방법을 제공해요.
FluentdDaemonSet.
FluentdDaemonSet의 리소스 명세를 설정하려면 아래 명령으로 LogCollector CR을 패치하세요:
kubectl patch logcollector tigera-secure --type=merge --patch='{"spec": {"fluentdDaemonSet":{"spec": {"template": {"spec": {"containers":[{"name":"fluentd","resources":{"limits":{"cpu":"1", "memory":"1000Mi"},"requests":{"cpu":"100m", "memory":"100Mi"}}}]}}}}}}'
이 명령은 CPU request를 100 밀리CPU(mCPU), 메모리 request를 100 메비바이트(MiB)로 설정하고, CPU limit을 1 CPU, 메모리 limit을 1000 메비바이트(MiB)로 설정해요.
검증 (Verification)
다음 명령으로 설정된 리소스를 확인할 수 있어요:
kubectl get daemonset.apps/fluentd-node -n tigera-fluentd -o json | jq '.spec.template.spec.containers[] | {name: .name, resources: .resources}'
이 명령은 FluentdDaemonSet의 설정된 리소스 requests와 limits를 JSON 형식으로 출력해요.
{
"name": "fluentd",
"resources": {
"limits": {
"cpu": "1",
"memory": "1000Mi"
},
"requests": {
"cpu": "100m",
"memory": "100Mi"
}
}
}
EKSLogForwarderDeployment.
EKSLogForwarderDeployment의 리소스 명세를 설정하려면 아래 명령으로 LogCollector CR을 패치하세요:
kubectl patch logcollector tigera-secure --type=merge --patch='{"spec": {"eksLogForwarderDeployment": {"spec": {"template": {"spec": {"containers":[{"name":"eks-log-forwarder","resources":{"limits":{"cpu":"1", "memory":"1000Mi"},"requests":{"cpu":"100m", "memory":"100Mi"}}}]}}}}}}'
이 명령은 CPU request를 100 밀리CPU(mCPU), 메모리 request를 100 메비바이트(MiB)로 설정하고, CPU limit을 1 CPU, 메모리 limit을 1000 메비바이트(MiB)로 설정해요.
검증 (Verification)
다음 명령으로 설정된 리소스를 확인할 수 있어요:
kubectl get deployment.apps/eks-log-forwarder -n tigera-fluentd -o json | jq '.spec.template.spec.containers[] | {name: .name, resources: .resources}'
이 명령은 EKSLogForwarderDeployment의 설정된 리소스 requests와 limits를 JSON 형식으로 출력해요.
{
"name": "eks-log-forwarder",
"resources": {
"limits": {
"cpu": "1",
"memory": "1000Mi"
},
"requests": {
"cpu": "100m",
"memory": "100Mi"
}
}
}
LogStorage 커스텀 리소스 (LogStorage custom resource)
LogStorage CR은 ECKOperatorStatefulSet, Kibana, LinseedDeployment, ElasticsearchMetricsDeployment의 리소스를 설정할 수 있는 방법을 제공해요. 다음 섹션에서 이 CR의 예시 설정을 보여 줄게요.
ECKOperatorStatefulSet.
ECKOperatorStatefulSet의 리소스 명세를 설정하려면 아래 명령으로 LogStorage CR을 패치하세요:
kubectl patch logstorage tigera-secure --type=merge --patch='{"spec": {"eckOperatorStatefulSet":{"spec": {"template": {"spec": {"containers":[{"name":"manager","resources":{"limits":{"cpu":"1", "memory":"1000Mi"},"requests":{"cpu":"100m", "memory":"100Mi"}}}]}}}}}}'
이 명령은 CPU request를 100 밀리CPU(mCPU), 메모리 request를 100 메비바이트(MiB)로 설정하고, CPU limit을 1 CPU, 메모리 limit을 1000 메비바이트(MiB)로 설정해요.
검증 (Verification)
다음 명령으로 설정된 리소스를 확인할 수 있어요:
kubectl get statefulset.apps/elastic-operator -n tigera-eck-operator -o json | jq '.spec.template.spec.containers[] | {name: .name, resources: .resources}'
이 명령은 ECKOperatorStatefulSet의 설정된 리소스 requests와 limits를 JSON 형식으로 출력해요.
{
"name": "manager",
"resources": {
"limits": {
"cpu": "1",
"memory": "1000Mi"
},
"requests": {
"cpu": "100m",
"memory": "100Mi"
}
}
}
Kibana
Kibana의 리소스 명세를 설정하려면 아래 명령으로 LogStorage CR을 패치하세요:
kubectl patch logstorage tigera-secure --type=merge --patch='{"spec": {"kibana":{"spec": {"template": {"spec": {"containers":[{"name":"kibana","resources":{"limits":{"cpu":"1", "memory":"1000Mi"},"requests":{"cpu":"100m", "memory":"100Mi"}}}]}}}}}}'
이 명령은 CPU request를 100 밀리CPU(mCPU), 메모리 request를 100 메비바이트(MiB)로 설정하고, CPU limit을 1 CPU, 메모리 limit을 1000 메비바이트(MiB)로 설정해요.
검증 (Verification)
다음 명령으로 설정된 리소스를 확인할 수 있어요:
kubectl get deployment.apps/tigera-secure-kb -n tigera-kibana -o json| jq '.spec.template.spec.containers[] | {name: .name, resources: .resources}'
이 명령은 Kibana의 설정된 리소스 requests와 limits를 JSON 형식으로 출력해요.
{
"name": "kibana",
"resources": {
"limits": {
"cpu": "1",
"memory": "1000Mi"
},
"requests": {
"cpu": "100m",
"memory": "100Mi"
}
}
}
LinseedDeployment
LinseedDeployment의 리소스 명세를 설정하려면 아래 명령으로 LogStorage CR을 패치하세요:
kubectl patch logstorage tigera-secure --type=merge --patch='{"spec": {"linseedDeployment":{"spec": {"template": {"spec": {"containers":[{"name":"tigera-linseed","resources":{"limits":{"cpu":"1", "memory":"1000Mi"},"requests":{"cpu":"100m", "memory":"100Mi"}}}]}}}}}}'
이 명령은 CPU request를 100 밀리CPU(mCPU), 메모리 request를 100 메비바이트(MiB)로 설정하고, CPU limit을 1 CPU, 메모리 limit을 1000 메비바이트(MiB)로 설정해요.
검증 (Verification)
다음 명령으로 설정된 리소스를 확인할 수 있어요:
kubectl get deployment.apps/tigera-linseed -n tigera-elasticsearch -o json| jq '.spec.template.spec.containers[] | {name: .name, resources: .resources}'
이 명령은 LinseedDeployment의 설정된 리소스 requests와 limits를 JSON 형식으로 출력해요.
{
"name": "tigera-linseed",
"resources": {
"limits": {
"cpu": "1",
"memory": "1000Mi"
},
"requests": {
"cpu": "100m",
"memory": "100Mi"
}
}
}
ElasticsearchMetricsDeployment
ElasticsearchMetricsDeployment의 리소스 명세를 설정하려면 아래 명령으로 LogStorage CR을 패치하세요:
kubectl patch logstorage tigera-secure --type=merge --patch='{"spec": {"elasticsearchMetricsDeployment":{"spec": {"template": {"spec": {"containers":[{"name":"tigera-elasticsearch-metrics","resources":{"limits":{"cpu":"1", "memory":"1000Mi"},"requests":{"cpu":"100m", "memory":"1000Mi"}}}]}}}}}}'
이 명령은 CPU request를 100 밀리CPU(mCPU), 메모리 request를 100 메비바이트(MiB)로 설정하고, CPU limit을 1 CPU, 메모리 limit을 1000 메비바이트(MiB)로 설정해요.
검증 (Verification)
다음 명령으로 설정된 리소스를 확인할 수 있어요:
kubectl get deployment.apps/tigera-elasticsearch-metrics -n tigera-elasticsearch -o json| jq '.spec.template.spec.containers[] | {name: .name, resources: .resources}'
이 명령은 ElasticsearchMetricsDeployment의 설정된 리소스 requests와 limits를 JSON 형식으로 출력해요.
{
"name": "tigera-elasticsearch-metrics",
"resources": {
"limits": {
"cpu": "1",
"memory": "1000Mi"
},
"requests": {
"cpu": "100m",
"memory": "1000Mi"
}
}
}
ManagementClusterConnection 커스텀 리소스 (ManagementClusterConnection custom resource)
ManagementClusterConnection CR은 GuardianDeployment의 리소스를 설정할 수 있는 방법을 제공해요. 다음 섹션에서 이 CR의 예시 설정을 보여 줄게요.
GuardianDeployment
GuardianDeployment의 리소스 명세를 설정하려면 아래 명령으로 ManagementClusterConnection CR을 패치하세요:
kubectl patch managementclusterconnection tigera-secure --type=merge --patch='{"spec": {"guardianDeployment":{"spec": {"template": {"spec": {"containers":[{"name":"tigera-guardian","resources":{"limits":{"cpu":"1", "memory":"1000Mi"},"requests":{"cpu":"100m", "memory":"100Mi"}}}]}}}}}}'
이 명령은 CPU request를 100 밀리CPU(mCPU), 메모리 request를 100 메비바이트(MiB)로 설정하고, CPU limit을 1 CPU, 메모리 limit을 1000 메비바이트(MiB)로 설정해요.
검증 (Verification)
다음 명령으로 설정된 리소스를 확인할 수 있어요:
kubectl get deployment.apps/tigera-guardian -n tigera-guardian -o json | jq '.spec.template.spec.containers[] | {name: .name, resources: .resources}'
이 명령은 GuardianDeployment의 설정된 리소스 requests와 limits를 JSON 형식으로 출력해요.
{
"name": "tigera-guardian",
"resources": {
"limits": {
"cpu": "1",
"memory": "1000Mi"
},
"requests": {
"cpu": "100m",
"memory": "100Mi"
}
}
}
Manager 커스텀 리소스 (Manager custom resource)
Manager CR은 ManagerDeployment의 리소스를 설정할 수 있는 방법을 제공해요. 다음 섹션에서 이 CR의 예시 설정을 보여 줄게요.
ManagerDeployment
ManagerDeployment의 리소스 명세를 설정하려면 아래 명령으로 Manager CR을 패치하세요:
kubectl patch manager tigera-secure --type=merge --patch='{"spec": {"managerDeployment":{"spec": {"template": {"spec": {"containers":[{"name":"calico-voltron","resources":{"limits":{"cpu":"1", "memory":"1000Mi"},"requests":{"cpu":"100m", "memory":"100Mi"}}},{"name":"tigera-ui-apis","resources":{"limits":{"cpu":"1", "memory":"1000Mi"},"requests":{"cpu":"100m", "memory":"100Mi"}}},{"name":"calico-manager","resources":{"limits":{"cpu":"1", "memory":"1000Mi"},"requests":{"cpu":"100m", "memory":"100Mi"}}}]}}}}}}'
이 명령은 CPU request를 100 밀리CPU(mCPU), 메모리 request를 100 메비바이트(MiB)로 설정하고, CPU limit을 1 CPU, 메모리 limit을 1000 메비바이트(MiB)로 설정해요.
검증 (Verification)
다음 명령으로 설정된 리소스를 확인할 수 있어요:
kubectl get deployment.apps/calico-manager -n calico-system -o json | jq '.spec.template.spec.containers[] | {name: .name, resources: .resources}'
이 명령은 ManagerDeployment의 설정된 리소스 requests와 limits를 JSON 형식으로 출력해요.
{
"name": "calico-ui-apis",
"resources": {
"limits": {
"cpu": "1",
"memory": "1000Mi"
},
"requests": {
"cpu": "100m",
"memory": "100Mi"
}
}
}
{
"name": "calico-voltron",
"resources": {
"limits": {
"cpu": "1",
"memory": "1000Mi"
},
"requests": {
"cpu": "100m",
"memory": "100Mi"
}
}
}
{
"name": "calico-manager",
"resources": {
"limits": {
"cpu": "1",
"memory": "1000Mi"
},
"requests": {
"cpu": "100m",
"memory": "100Mi"
}
}
}
Monitor 커스텀 리소스 (Monitor custom resource)
Monitor CR은 Prometheus, Alertmanager의 리소스를 설정할 수 있는 방법을 제공해요. 다음 섹션에서 이 CR의 예시 설정을 보여 줄게요.
Prometheus
Prometheus의 리소스 명세를 설정하려면 기본 컨테이너 "prometheus"의 Resources는 "commonPrometheusFields" 아래 "resources" 필드로 설정할 수 있어요. "authn-proxy" 같은 다른 주입된 컨테이너의 리소스 설정은 아래 patch 명령에서 보이듯 "containers" 구조체를 사용해 설정할 수 있어요.
kubectl patch monitor tigera-secure --type=merge --patch='{"spec": {"prometheus": {"spec":{ "commonPrometheusFields": {"resources": {"limits": {"cpu":"500m","memory":"500Mi"}, "requests": {"cpu":"50m", "memory":"50Mi"}}, "containers":[{"name":"authn-proxy","resources":{"limits": {"cpu":"250m","memory":"500Mi"},"requests": {"cpu":"25m","memory":"50Mi"}}}]}}}}}'
이 명령은 CPU request를 100 밀리CPU(mCPU), 메모리 request를 100 메비바이트(MiB)로 설정하고, CPU limit을 1 CPU, 메모리 limit을 1000 메비바이트(MiB)로 설정해요.
검증 (Verification)
다음 명령으로 설정된 리소스를 확인할 수 있어요:
kubectl get statefulset.apps/prometheus-calico-node-prometheus -n tigera-prometheus -o json | jq '.spec.template.spec.containers[] | {name: .name, resources: .resources}'
이 명령은 Prometheus의 설정된 리소스 requests와 limits를 JSON 형식으로 출력해요.
보조 설명(SECONDARY): "config-reloader" 컨테이너는 Prometheus 리소스에 의해 설정된 기본 리소스 값을 가져요.
{
"name": "prometheus",
"resources": {
"limits": {
"cpu": "500m",
"memory": "500Mi"
},
"requests": {
"cpu": "50m",
"memory": "50Mi"
}
}
}
{
"name": "config-reloader",
"resources": {
"limits": {
"cpu": "10m",
"memory": "50Mi"
},
"requests": {
"cpu": "10m",
"memory": "50Mi"
}
}
}
{
"name": "authn-proxy",
"resources": {
"limits": {
"cpu": "250m",
"memory": "500Mi"
},
"requests": {
"cpu": "25m",
"memory": "50Mi"
}
}
}
Alertmanager
Alertmanager의 리소스 명세를 설정하려면 기본 컨테이너 "prometheus"의 리소스는 "commonPrometheusFields" 아래 "resources" 필드로 설정할 수 있어요. "authn-proxy" 같은 다른 주입된 컨테이너의 리소스 설정은 아래 patch 명령에서 보이듯 "containers" 구조체를 사용해 설정할 수 있어요.
kubectl patch monitor tigera-secure --type=merge --patch='{"spec": {"alertManager": {"spec": {"resources":{"limits":{"cpu":"1", "memory":"1000Mi"},"requests":{"cpu":"100m", "memory":"100Mi"}}}}}}'
이 명령은 CPU request를 100 밀리CPU(mCPU), 메모리 request를 100 메비바이트(MiB)로 설정하고, CPU limit을 1 CPU, 메모리 limit을 1000 메비바이트(MiB)로 설정해요.
검증 (Verification)
다음 명령으로 설정된 리소스를 확인할 수 있어요:
kubectl get statefulset.apps/alertmanager-calico-node-alertmanager -n tigera-prometheus -o json | jq '.spec.template.spec.containers[] | {name: .name, resources: .resources}'
이 명령은 Alertmanager의 설정된 리소스 requests와 limits를 JSON 형식으로 출력해요.
보조 설명(SECONDARY): "config-reloader" 컨테이너는 Alertmanager 리소스에 의해 설정된 기본 리소스 값을 가져요.
{
"name": "alertmanager",
"resources": {
"limits": {
"cpu": "1",
"memory": "1000Mi"
},
"requests": {
"cpu": "100m",
"memory": "100Mi"
}
}
}
{
"name": "config-reloader",
"resources": {
"limits": {
"cpu": "10m",
"memory": "50Mi"
},
"requests": {
"cpu": "10m",
"memory": "50Mi"
}
}
}
PacketCaptureAPI 커스텀 리소스 (PacketCaptureAPI custom resource)
PacketCaptureAPI CR은 PacketCapture의 리소스를 설정할 수 있는 방법을 제공해요. 다음 섹션에서 이 CR의 예시 설정을 보여 줄게요.
PacketCaptureAPIDeployment
PacketCaptureAPI의 리소스 명세를 설정하려면 아래 명령으로 PacketCapture CR을 패치하세요:
kubectl patch packetcaptureapis tigera-secure --type=merge --patch='{"spec": {"packetCaptureAPIDeployment":{"spec": {"template": {"spec": {"containers":[{"name":"tigera-packetcapture-server","resources":{"limits":{"cpu":"1", "memory":"1000Mi"},"requests":{"cpu":"100m", "memory":"100Mi"}}}]}}}}}}'
이 명령은 CPU request를 100 밀리CPU(mCPU), 메모리 request를 100 메비바이트(MiB)로 설정하고, CPU limit을 1 CPU, 메모리 limit을 1000 메비바이트(MiB)로 설정해요.
검증 (Verification)
다음 명령으로 설정된 리소스를 확인할 수 있어요:
kubectl get deployment.apps/tigera-packetcapture -n tigera-packetcapture -o json | jq '.spec.template.spec.containers[] | {name: .name, resources: .resources}'
이 명령은 PacketCaptureDeployment의 설정된 리소스 requests와 limits를 JSON 형식으로 출력해요.
{
"name": "tigera-packetcapture-server",
"resources": {
"limits": {
"cpu": "1",
"memory": "1000Mi"
},
"requests": {
"cpu": "100m",
"memory": "100Mi"
}
}
}
PolicyRecommendation 커스텀 리소스 (PolicyRecommendation custom resource)
PolicyRecommendation CR은 PolicyRecommendation의 리소스를 설정할 수 있는 방법을 제공해요. 다음 섹션에서 이 CR의 예시 설정을 보여 줄게요.
PolicyRecommendationDeployment
PolicyRecommendationDeployment의 리소스 명세를 설정하려면 아래 명령으로 PolicyRecommendation CR을 패치하세요:
kubectl patch policyrecommendation tigera-secure --type=merge --patch='{"spec": {"policyRecommendationDeployment":{"spec": {"template": {"spec": {"containers":[{"name":"policy-recommendation-controller","resources":{"requests":{"cpu":"100m", "memory":"100Mi"},"limits":{"cpu":"1", "memory":"512Mi"}}}]}}}}}}'
이 명령은 CPU request를 100 밀리CPU(mCPU), 메모리 request를 100 메비바이트(MiB)로 설정하고, CPU limit을 1 CPU, 메모리 limit을 1000 메비바이트(MiB)로 설정해요.
검증 (Verification)
다음 명령으로 설정된 리소스를 확인할 수 있어요:
kubectl get deployment.apps/tigera-policy-recommendation -n calico-system -o json | jq '.spec.template.spec.containers[] | {name: .name, resources: .resources}'
이 명령은 PolicyRecommendationDeployment의 설정된 리소스 requests와 limits를 JSON 형식으로 출력해요.
{
"name": "policy-recommendation-controller",
"resources": {
"limits": {
"cpu": "1",
"memory": "512Mi"
},
"requests": {
"cpu": "100m",
"memory": "100Mi"
}
}
}
Helm으로 업데이트하기 (Update via Helm)
Helm 차트로 설치하는 과정에서 설정을 업데이트하려면, Helm install을 실행하기 전에 values.yaml에 컴포넌트에 필요한 리소스 값을 수정해서 넣으세요.
보조 설명(SECONDARY): 제공된 예시는 apiserver 컴포넌트를 설정하는 모습이에요. 다른 컴포넌트도 비슷한 방식으로 values.yaml을 수정하면 Helm 차트로 설치할 때 리소스 requests와 limits를 업데이트할 수 있어요.
APIServer 커스텀 리소스 (APIServer custom resource)
APIServer CR은 APIServerDeployment를 설정할 수 있는 방법을 제공해요. 다음 섹션에서 apiserver 컴포넌트의 예시 values.yaml을 보여 줄게요.
APIServerDeployment
APIServerDeployment의 리소스 명세를 설정하려면 values.yaml에 적절한 리소스 값을 업데이트하세요.
apiServer:
apiServerDeployment:
spec:
template:
spec:
containers:
- name: calico-apiserver
resources:
limits:
cpu: 1
memory: 1000Mi
requests:
cpu: 100m
memory: 100Mi
다음 명령으로 설정된 리소스를 확인할 수 있어요:
kubectl get deployment.apps/calico-apiserver -n calico-system -o json | jq '.spec.template.spec.containers[] | {name: .name, resources: .resources}'
더 알아보기 (Learn more)
각 컴포넌트에 적용 가능한 전체 컨테이너 목록은 Tigera 오퍼레이터 API 레퍼런스의 컴포넌트 스펙을 참고하세요. Helm 기반 설치 절차 전체는 Helm 설치 문서를 살펴보세요. 컴포넌트 리소스 외에 로그 저장소 용량 관리가 필요하면 LogStorage 스펙도 함께 확인해 보세요.