본문으로 바로가기 본문 바로가기
WIKI 기술 지식 베이스

Felix 구성 리소스 파트 5

원문 보기 위키 갱신

Felix 구성 리소스 파트 5 (Calico Enterprise)

Calico Enterprise용 Felix 구성 리소스(FelixConfiguration) 레퍼런스의 다섯 번째 파트예요. 이 파트에서는 L7 로그 파일 집계, AWS 연동, 이그레스 게이트웨이·이그레스 IP, 외부 네트워크, 패킷 캡처, L7 프록시, 디버그 설정부터 헬스 타임아웃 오버라이드, ProtoPort, DNS 정책 모드, 라우팅 테이블 범위까지 이 파트 전용 키들을 살펴봐요. 키 이름과 코드, 표의 값들은 원문 그대로 유지했으니 실제 설정할 때 그대로 참고하면 돼요.

출처: 문서

본문

l7LogsFileAggregationSourceInfo
Attribute Value
Key l7LogsFileAggregationSourceInfo
Description L7 로그 엔트리의 소스 메타데이터에 사용할 집계 타입을 선택해요. 허용 값은 IncludeL7SourceInfo, IncludeL7SourceInfoNoPort, ExcludeL7SourceInfo예요. IncludeL7SourceInfo - 로그에 소스 메타데이터를 포함해요. IncludeL7SourceInfoNoPort - 소스 포트를 제외하고 소스 메타데이터를 로그에 포함해요. ExcludeL7SourceInfo - 집계된 소스 이름, 네임스페이스, 타입을 무시하고 다른 모든 필드 기준으로 집계해요.
Schema One of: ExcludeL7SourceInfo, IncludeL7SourceInfo, IncludeL7SourceInfoNoPort.
Default IncludeL7SourceInfoNoPort
l7LogsFileAggregationTrimURL
Attribute Value
Key l7LogsFileAggregationTrimURL
Description L7 로그 엔트리의 URL에 사용할 집계 타입을 선택해요. 허용 값: IncludeL7FullURL - L7LogsFileAggregationNumURLPath가 허용하는 만큼의 경로 컴포넌트까지 전체 URL을 포함해요. TrimURLQuery - URL의 쿼리 파라미터를 무시하고 다른 모든 필드 기준으로 집계해요. TrimURLQueryAndPath - 다른 모든 필드와 베이스 URL만 남기고 집계해요. ExcludeL7URL - URL 자체를 무시하고 다른 모든 필드 기준으로 집계해요.
Schema One of: ExcludeL7URL, IncludeL7FullURL, TrimURLQuery, TrimURLQueryAndPath.
Default IncludeL7FullURL
l7LogsFileAggregationURLCharLimit
Attribute Value
Key l7LogsFileAggregationURLCharLimit
Description L7 로그에 수집되는 URL 길이 제한이에요. URL 길이가 이 제한에 도달하면 잘라내고, 잘린 URL이 로그 스토리지로 전송돼요.
Schema Integer
Default 250
l7LogsFileDirectory
Attribute Value
Key l7LogsFileDirectory
Description L7 로그 파일이 저장되는 디렉터리를 지정해요.
Schema String.
Default /var/log/calico/l7logs
l7LogsFileEnabled
Attribute Value
Key l7LogsFileEnabled
Description L7 로그를 파일에 기록할지 제어해요. false면 파일로의 L7 로깅은 일어나지 않아요.
Schema Boolean.
Default true
l7LogsFileMaxFileSizeMB
Attribute Value
Key l7LogsFileMaxFileSizeMB
Description 로테이션 전 L7 로그 파일의 최대 크기(MB)를 지정해요.
Schema Integer
Default 100
l7LogsFileMaxFiles
Attribute Value
Key l7LogsFileMaxFiles
Description 유지할 L7 로그 파일 개수를 지정해요.
Schema Integer
Default 5
l7LogsFilePerNodeLimit
Attribute Value
Key l7LogsFilePerNodeLimit
Description 플러시 간격마다 방출할 수 있는 L7 로그 수의 제한이에요. 이 제한에 도달하면 Felix는 해당 플러시 간격 동안 기록하지 못한 L7 응답 수를 세고, 버퍼에 담아둔 L7 로그를 플러시하는 시점에 그 수를 담은 WARNING 로그를 함께 방출해요. 0은 제한 없음을 의미해요.
Schema Integer
Default 1500
l7LogsFlushInterval
Attribute Value
Key l7LogsFlushInterval
Description Felix가 L7 로그를 내보내는(export) 간격을 설정해요.
Schema Duration string, for example 1m30s123ms or 1h5m.
Default 5m0s

AWS 연동

awsRequestTimeout
Attribute Value
Key awsRequestTimeout
Description AWS API 요청의 타임아웃이에요.
Schema Duration string, for example 1m30s123ms or 1h5m.
Default 30s
awsSecondaryIPRoutingRulePriority
Attribute Value
Key awsSecondaryIPRoutingRulePriority
Description AWS Secondary IP 지원을 위해 라우팅 규칙을 프로그래밍할 때 Felix가 사용할 우선순위를 제어해요.
Schema Integer: [0,4294967295]
Default 101
awsSecondaryIPSupport
Attribute Value
Key awsSecondaryIPSupport
Description AWS 서브넷 ID로 설정된 IP 풀의 IP를 가진 워크로드에 대해 Felix가 AWS 보조 ENI를 프로비저닝할지 제어해요. 이 필드가 "EnabledENIPerWorkload"로 설정되면 AWS 기반 IP를 가진 각 워크로드에 자체 보조 ENI가 할당돼요. "Enabled"로 설정되면 AWS 기반 IP 풀을 가진 각 워크로드에 보조 ENI 위의 보조 IP 주소가 할당돼요. 이 모드는 호스트가 보조 ENI의 프라이머리 IP를 클레임할 수 있도록 추가 IP 풀을 프로비저닝해야 해요. 허용 값은 반드시 "Enabled", "EnabledENIPerWorkload", "Disabled" 중 하나여야 해요.
Schema One of: Disabled, Enabled, EnabledENIPerWorkload.
Default Disabled
awsSrcDstCheck
Attribute Value
Key awsSrcDstCheck
Description Felix가 자신이 실행 중인 EC2 인스턴스의 "source/dest check" 설정을 변경할지 제어해요. "Disable" 값은 source/dest check를 비활성화하려고 시도해요. 이 체크를 비활성화하면 같은 AWS 서브넷 안에서 캡슐화 없이 워크로드 트래픽을 보낼 수 있어요.
Schema One of: "Disable", "DoNothing", "Enable".
Default DoNothing

이그레스 게이트웨이

egressGatewayPollFailureCount
Attribute Value
Key egressGatewayPollFailureCount
Description 원격 이그레스 게이트웨이가 실패한 것으로 간주되기 전까지 필요한 최소 폴링 실패 횟수예요.
Schema Integer
Default 3
egressGatewayPollInterval
Attribute Value
Key egressGatewayPollInterval
Description Felix가 원격 이그레스 게이트웨이의 헬스를 확인하기 위해 폴링하는 간격이에요. 이름이 "health"인 포트를 가진 이그레스 게이트웨이만 이 방식으로 폴링돼요. 헬스 체크에 실패한 이그레스 게이트웨이는 삭제된 것처럼 사용 중지돼요.
Schema Duration string, for example 1m30s123ms or 1h5m.
Default 10s
egressIPHostIfacePattern
Attribute Value
Key egressIPHostIfacePattern
Description 이그레스 게이트웨이 pod를 떠난 뒤 클러스터 경계를 넘어 이그레스 트래픽을 주고받을 수 있는 인터페이스 이름의 콤마 구분 목록이에요. Felix는 매칭되는 인터페이스에 src_valid_mark sysctl 플래그가 올바르게 설정되도록 보장해요. 하나의 문자열로 여러 인터페이스를 대상으로 삼으려면 목록이 정규표현식을 지원해요. 정규표현식은 값에 /를 붙여 감싸요. 예: /^bond/,eth0는 bond로 시작하는 모든 인터페이스와 eth0 인터페이스에 매칭돼요.
Schema String.
Default none
egressIPRoutingRulePriority
Attribute Value
Key egressIPRoutingRulePriority
Description 이그레스 IP 라우팅 규칙에 사용할 우선순위 값을 제어해요.
Schema Integer
Default 100
egressIPSupport
Attribute Value
Key egressIPSupport
Description 이그레스 IP 기능의 세 가지 지원 모드를 정의해요. - Disabled: 이그레스 IP 기능이 비활성화돼요. - EnabledPerNamespace: 이그레스 IP 기능이 활성화되고 네임스페이스 단위로 설정할 수 있어요. pod별 이그레스 어노테이션은 무시돼요. - EnabledPerNamespaceOrPerPod: 이그레스 IP 기능이 활성화되고 네임스페이스 단위 또는 pod 단위로 설정할 수 있으며, pod별 이그레스 어노테이션이 네임스페이스 어노테이션을 덮어써요.
Schema One of: Disabled, EnabledPerNamespace, EnabledPerNamespaceOrPerPod.
Default Disabled
egressIPVXLANPort
Attribute Value
Key egressIPVXLANPort
Description 이그레스 트래픽용 VXLAN 터널 디바이스의 포트 번호예요.
Schema Integer
Default 4790
egressIPVXLANVNI
Attribute Value
Key egressIPVXLANVNI
Description 이그레스 트래픽용 VXLAN 터널 디바이스의 VNI ID예요.
Schema Integer
Default 4097

외부 네트워크 지원

externalNetworkRoutingRulePriority
Attribute Value
Key externalNetworkRoutingRulePriority
Description 외부 네트워크 라우팅 규칙에 사용할 우선순위 값을 제어해요.
Schema Integer
Default 102
externalNetworkSupport
Attribute Value
Key externalNetworkSupport
Description 외부 네트워크 기능의 두 가지 지원 모드를 정의해요. - Disabled: 외부 네트워크 기능이 비활성화돼요. - Enabled: 외부 네트워크 기능이 활성화돼요.
Schema One of: Disabled, Enabled.
Default Disabled

패킷 캡처

captureDir
Attribute Value
Key captureDir
Description 파일 캡처를 저장할 디렉터리를 제어해요.
Schema String.
Default /var/log/calico/pcap
captureMaxFiles
Attribute Value
Key captureMaxFiles
Description 유지할 로테이션된 캡처 파일 개수를 제어해요.
Schema Integer
Default 2
captureMaxSizeBytes
Attribute Value
Key captureMaxSizeBytes
Description 파일 캡처의 최대 크기를 제어해요.
Schema Integer
Default 10000000
captureRotationSeconds
Attribute Value
Key captureRotationSeconds
Description 패킷 캡처의 시간 기반 로테이션을 제어해요.
Schema Integer
Default 3600

L7 프록시

tproxyMode
Attribute Value
Key tproxyMode
Description 트래픽을 추가 처리를 위해 투명 프록시(transparent proxy)로 보낼지 여부와 프록시 방식을 설정해요.
Schema One of: Disabled, Enabled, EnabledAllServices.
Default Disabled
tproxyPort
Attribute Value
Key tproxyPort
Description 프록시된 트래픽이 리다이렉트될 포트를 설정해요.
Schema Integer
Default 16001
tproxyUpstreamConnMark
Attribute Value
Key tproxyUpstreamConnMark
Description 프록시가 업스트림 연결에 사용하는 마크 값을 Felix에 알려줘서 Felix가 데이터플레인을 올바르게 프로그래밍하도록 해요.
Schema Unsigned 32-bit integer.
Default 0x17

디버그/테스트 전용(일반적으로 지원되지 않음)

debugDisableLogDropping
Attribute Value
Key debugDisableLogDropping
Description 로그 버퍼가 가득 찼을 때 로그 메시지 드롭을 비활성화해요. 로그 쓰기가 병목이면 성능에 상당한 영향을 줄 수 있어요.
Schema Boolean.
Default false
debugHost
Attribute Value
Key debugHost
Description 디버그 포트를 바인딩할 호스트 IP 또는 호스트명이에요. DebugPort가 설정된 경우에만 사용돼요.
Schema String.
Default localhost
debugMemoryProfilePath
Attribute Value
Key debugMemoryProfilePath
Description 시그널에 의해 트리거될 때 메모리 프로파일을 기록할 경로예요.
Schema String.
Default none
debugPort
Attribute Value
Key debugPort
Description 설정하면 메모리·CPU 프로파일을 가져올 수 있는 Felix의 디버그 HTTP 포트를 활성화해요. 디버그 포트는 보안하지 않으니 인터넷에 노출하면 안 돼요.
Schema Integer: [0,65535]
Default none
debugSimulateCalcGraphHangAfter
Attribute Value
Key debugSimulateCalcGraphHangAfter
Description 지정한 시간 후 계산 그래프의 hang을 시뮬레이션하는 데 사용해요. 워치독 시스템 테스트에서만 유용해요!
Schema Duration string, for example 1m30s123ms or 1h5m.
Default 0s
debugSimulateDataplaneApplyDelay
Attribute Value
Key debugSimulateDataplaneApplyDelay
Description 모든 데이터플레인 연산에 인위적인 지연을 추가해요. 테스트 목적으로 부하가 큰 시스템을 시뮬레이션할 때만 유용해요.
Schema Duration string, for example 1m30s123ms or 1h5m.
Default 0s
debugSimulateDataplaneHangAfter
Attribute Value
Key debugSimulateDataplaneHangAfter
Description 지정한 시간 후 데이터플레인의 hang을 시뮬레이션하는 데 사용해요. 워치독 시스템 테스트에서만 유용해요!
Schema Duration string, for example 1m30s123ms or 1h5m.
Default 0s
statsDumpFilePath
Attribute Value
Key statsDumpFilePath
Description 시그널에 의해 트리거될 때 진단용 플로우 로그 통계 덤프를 기록할 경로예요.
Schema String.
Default /var/log/calico/stats/dump

사용량 리포팅

usageReportingEnabled
Attribute Value
Key usageReportingEnabled
Description Calico Enterprise에서는 사용하지 않으며, 사용량 리포팅은 영구적으로 비활성화돼 있어요.
Schema Boolean.
Default true
usageReportingInitialDelay
Attribute Value
Key usageReportingInitialDelay
Description Calico Enterprise에서는 사용하지 않으며, 사용량 리포팅은 영구적으로 비활성화돼 있어요.
Schema Duration string, for example 1m30s123ms or 1h5m.
Default 5m0s
usageReportingInterval
Attribute Value
Key usageReportingInterval
Description Calico Enterprise에서는 사용하지 않으며, 사용량 리포팅은 영구적으로 비활성화돼 있어요.
Schema Duration string, for example 1m30s123ms or 1h5m.
Default 24h0m0s

헬스 타임아웃 오버라이드(Health Timeout Overrides)

Felix는 자신의 다양한 루프를 감시하는 내부 라이브니스(liveness)·레디니스(readiness) 워치독 타이머를 갖고 있어요. 루프가 배정된 타임아웃 안에 "check in"하지 못하면 Felix는 헬스 포트에서 non-Ready 또는 non-Live를 보고해요(쿠버네티스 시스템에서는 kubelet이 이 포트를 감시해요). Felix가 non-Live를 보고하면 Pod가 재시작될 수 있어요.

쿠버네티스에서 calico-node Pod의 readiness 또는 liveness 체크가 간헐적으로 실패한다면, 전체 헬스 상태를 알려주는 Felix의 로그를 calico-node Pod 로그에서 확인해 보세요(컴포넌트 목록은 활성화된 기능에 따라 달라져요):

+---------------------------+---------+----------------+-----------------+--------+
|         COMPONENT         | TIMEOUT |    LIVENESS    |    READINESS    | DETAIL |
+---------------------------+---------+----------------+-----------------+--------+
| CalculationGraph          | 30s     | reporting live | reporting ready |        |
| FelixStartup              | 0s      | reporting live | reporting ready |        |
| InternalDataplaneMainLoop | 1m30s   | reporting live | reporting ready |        |
+---------------------------+---------+----------------+-----------------+--------+

일부 헬스 타임아웃이 "timed out"으로 표시된다면 healthTimeoutOverrides 필드로 오버라이드를 적용하는 게 도움이 될 수 있어요:

...
spec:
  healthTimeoutOverrides:
  - name: InternalDataplaneMainLoop
    timeout: "5m"
  - name: CalculationGraph
    timeout: "1m30s"
  ...

타임아웃 값이 0이면 타임아웃이 비활성화돼요.

ProtoPort

Field Description Accepted Values Schema
port 정확한 포트 매치 0-65535 int
protocol 프로토콜 매치 tcp, udp, sctp string
net CIDR 매치 모든 유효한 CIDR (예: 192.168.0.0/16) string

다음 예시에서 net: ""과 net: "0.0.0.0/0"은 정책 적용 시 동일하게 처리된다는 점을 기억하세요.

  ...
spec:
  failsafeInboundHostPorts:
  - net: "192.168.1.1/32"
    port: 22
    protocol: tcp
  - net: ""
    port: 67
    protocol: udp
failsafeOutboundHostPorts:
  - net: "0.0.0.0/0"
    port: 67
    protocol: udp
  ...

AggregationKind

Value Description
0 집계 없음
1 각 노드에서 소스 포트가 같은 모든 플로우를 집계해요
2 각 노드에서 소스 포트가 같거나 같은 ReplicaSet에서 온 모든 플로우를 집계해요

DNSPolicyMode

Value Description
DelayDeniedPacket (default) 정책 통과가 허용된(egress domain 매치를 포함한) 패킷이 매치에 실패하면 Felix는 그 패킷을 지연시켜요. 패킷은 고정된 시간 후, 또는 목적지 IP 주소가 프로그래밍된 후 방출돼요.
DelayDNSResponse 관련 IPSet이 프로그래밍될 때까지 모든 DNS 응답을 지연시켜요. 모든 DNS 패킷에 약간의 지연을 더해요(IPSet 프로그래밍이 필요 없을 때도 포함), 하지만 정책 히트 통계가 정확해져요. 스테이지드 정책이나 정책 규칙 히트 통계를 사용할 때 권장되는 설정이에요. DelayDNSResponse를 사용하려면 리눅스 커널 3.13 이상이 필요해요. 더 오래된 커널에서는 이 값이 DelayDeniedPacket으로 변경돼요.
Inline iptables 내 DNS 응답 패킷 처리 과정에서 DNS 응답을 인라인으로 파싱해요. DNS 규칙이 변경 사항을 즉시 반영하도록 보장해요. 이 모드는 iptables에서만 동작하며 BPFDNSPolicyMode의 같은 모드와 매치돼요. 이 설정은 윈도우에서는 무시되고 항상 NoDelay가 사용돼요.
NoDelay Felix는 패킷에 어떤 지연도 추가하지 않아요. 첫 패킷이 정책 규칙을 통과할 때쯤 DNS 규칙이 아직 프로그래밍되지 않았을 수 있어요. 초기 연결 시도가 실패하면 클라이언트 애플리케이션이 재연결 시도를 처리해야 해요. 일부 애플리케이션이나 아주 낮은 DNS TTL에서는 문제가 될 수 있어요.

윈도우에서, 또는 eBPF 데이터플레인을 사용할 때는 이 설정이 무시돼요. 윈도우는 항상 NoDelay를 사용하고, eBPF에는 자체 BPFDNSPolicyMode 옵션이 있어요.

BPFDNSPolicyMode

Value Description
Inline Felix는 어떤 패킷에도 지연을 추가하지 않아요. Felix의 eBPF 프로그램은 DNS 응답을 파싱하고, DNS 응답이 애플리케이션으로 전달되기 전에 정책 규칙을 즉시 프로그래밍해요. 와일드카드 프리픽스에만 적용돼요: *.x.y.z는 이 방식으로 처리되지만, x.*.y.z 같은 와일드카드는 매치되지 않아요. 리눅스 커널 5.17 이상이 필요해요.
NoDelay Felix는 패킷에 어떤 지연도 추가하지 않아요. 첫 패킷이 정책 규칙을 통과할 때쯤 DNS 규칙이 아직 프로그래밍되지 않았을 수 있어요. 초기 연결 시도가 실패하면 클라이언트 애플리케이션이 재연결 시도를 처리해야 해요. 일부 애플리케이션이나 아주 낮은 DNS TTL에서는 문제가 될 수 있어요.

RouteTableRange

RouteTableRange 옵션은 이제 사용이 권장되지 않으며(deprecated), RouteTableRanges를 대신 사용해야 해요.

Field Description Accepted Values Schema
min 사용할 최소 인덱스 1-250 int
max 사용할 최대 인덱스 1-250 int

RouteTableRanges

RouteTableRanges는 RouteTableRange 객체의 목록이에요:

Field Description Accepted Values Schema
min 사용할 최소 인덱스 1 - 4294967295 int
max 사용할 최대 인덱스 1 - 4294967295 int

RouteTableRanges 목록의 각 항목은 Calico가 사용할 수 있는 라우팅 테이블의 범위를 지정해요. 기본적으로 Calico는 1-250의 단일 범위를 사용해요. 범위가 리눅스의 예약 테이블 범위(253-255)에 걸치면 그 테이블들은 목록에서 자동으로 제외돼요. 다른 테이블 범위가 Calico가 모르는 서드파티 시스템에 의해 예약되어 있을 가능성도 있어요. 그럴 때는 여러 범위를 정의해서 민감한 범위 아래와 위의 테이블을 각각 지정할 수 있어요:

 target tables 65-99, and 256-1000, skipping 100-255
calicoctl patch felixconfig default --type=merge -p '{"spec":{"routeTableRanges": [{"min": 65, "max": 99}, {"min": 256, "max": 1000}] }}

참고, 성능상의 이유로 Felix가 허용하는 라우팅 테이블의 최대 총 개수는 65535(즉 2*16)예요.

RouteTableRange와 RouteTableRanges 인자를 둘 다 지정하는 것은 지원되지 않으며 api에서 오류가 발생해요.

source-destination-check 설정을 위한 AWS IAM Role/Policy

awsSrcDstCheck를 Disable로 설정하면 필요한 IAM 역할과 정책이 설정되어 있다는 전제 아래, 클러스터 내 EC2 인스턴스에서 source-destination-check가 자동으로 비활성화돼요. 클러스터 노드의 IAM 역할에 할당된 정책 중 하나는 다음과 비슷한 statement를 포함해야 해요:

{
    "Effect": "Allow",
        "Action": [
            "ec2:DescribeInstances",
            "ec2:ModifyNetworkInterfaceAttribute"
        ],
    "Resource": "*"
}

위 statement를 포함하는 정책이 노드 역할에 붙어 있지 않다면 새 정책을 붙이세요. 예를 들어 노드 역할이 test-cluster-nodeinstance-role이라면 AWS 콘솔에서 해당 IAM 역할을 클릭해요. Permission policies 목록에서 위 statement가 담긴 새 인라인 정책을 새 정책 JSON 정의에 추가해요. 자세한 내용은 AWS documentation을 참고하세요.

EKS 클러스터에는 필요한 IAM 역할과 정책이 기본으로 마련되어 있어요. 추가 작업은 필요하지 않아요.

Supported operations

Datastore type Create Delete Delete (Global default) Update Get/List Notes
Kubernetes API server Yes Yes No Yes Yes

더 알아보기 (Learn more)