calicoctl 사용자 레퍼런스
명령줄 도구 calicoctl은 Calico Enterprise 네트워크와 보안 정책, 그 외 Calico Enterprise 구성을 쉽게 관리하게 해 줘요. 이 문서에서는 calicoctl의 명령 계층 구조와 지원 리소스 별칭을 살펴봐요.
출처: 문서
본문
관리할 수 있는 리소스 전체 목록과 각 리소스의 설명은 리소스 정의 섹션에 정리되어 있어요.
SECONDARY: 이 섹션은
calicoctl의 전체 레퍼런스 정보를 제공해요.calicoctl을 설치하고 구성하는 방법은 calicoctl 설치를 참고하세요.
calicoctl 명령줄 인터페이스는 리소스 관리 명령을 여러 개 제공해서 다양한 Calico Enterprise 리소스를 만들고, 수정하고, 삭제하고, 조회할 수 있게 해 줘요. 이 섹션은 명령 계층 구조를 기준으로 정리한 calicoctl 명령줄 레퍼런스예요.
최상위 도움말
calicoctl --help를 실행하면 최상위 calicoctl 명령에 대한 다음 도움말 메뉴가 표시돼요.
Usage:
calicoctl [options] <command> [<args>...]
create Create a resource by file, directory or stdin.
replace Replace a resource by file, directory or stdin.
apply Apply a resource by file, directory or stdin. This creates a resource
if it does not exist, and replaces a resource if it does exists.
patch Patch a pre-existing resource in place.
delete Delete a resource identified by file, directory, stdin or resource type and
name.
get Get a resource identified by file, directory, stdin or resource type and
name.
label Add or update labels of resources.
convert Convert config files between different API versions.
ipam IP address management.
cluster Access cluster information.
bgp Access BGP related information.
node Calico node management.
captured-packets Capture packet file command
review Review network policy activity.
version Display the version of calicoctl.
Options:
-h --help Show this screen.
-l --log-level=<level> Set the log level (one of panic, fatal, error,
warn, info, debug) [default: panic]
--context=<context> The name of the kubeconfig context to use.
--allow-version-mismatch Allow client and cluster versions mismatch.
Description:
The calicoctl command line tool is used to manage Calico network and security
policy, to view and manage endpoint configuration, and to manage a Calico
node instance.
See 'calicoctl <command> --help' to read about a specific subcommand.
SECONDARY: 멀티 클러스터 환경에서 kubeconfig 파일에 여러 클러스터 컨텍스트가 있으면, calicoctl
--context인수로 직접 컨텍스트를 바꿀 수 있어요.
SECONDARY: Calico와 calicoctl의 버전은 같아야 하고, 버전이 일치하지 않으면 calicoctl 호출이 실패해요. 필요하다면
--allow-version-mismatch인수로 이 동작을 무시할 수 있어요.
최상위 명령줄 옵션
calicoctl 명령의 세부 내용은 아래 링크된 문서에 최상위 명령별로 정리되어 있어요.
- calicoctl create
- calicoctl captured-packets
- calicoctl replace
- calicoctl apply
- calicoctl patch
- calicoctl delete
- calicoctl get
- calicoctl label
- calicoctl validate
- calicoctl convert
- calicoctl ipam
- calicoctl node
- calicoctl review
- calicoctl version
복수 네트워크 지원
복수 네트워크가 활성화되어 있으면, 이런 추가 네트워크의 세부 사항(워크로드 엔드포인트 등)을 보려면 환경 변수 MULTI_INTERFACE_MODE=multus를 설정해야 해요.
자세한 내용은 복수 네트워크 how-to 가이드를 참고하세요.
저수준 컴포넌트 구성 수정하기
저수준 Felix 또는 BGP 설정(FelixConfiguration과 BGPConfiguration 리소스 타입)을 업데이트하려면:
- 적절한 리소스를 조회하고 yaml 출력을 파일에 저장해요:
calicoctl get <resource type> <resource name> -o yaml --export > config.yaml. - 저장한 리소스 파일을 수정해요.
apply또는replace명령으로 리소스를 업데이트해요:calicoctl replace -f config.yaml.
자세한 내용은 Felix 구성을 참고하세요.
지원되는 리소스 정의 별칭
다음 표는 calicoctl 사용 시 지원되는 Calico Enterprise 리소스 별칭을 정리한 거예요. 모든 별칭은 대소문자를 구분하지 않아요.
| 리소스 정의 | 지원되는 calicoctl 별칭 |
|---|---|
| BGP configuration | bgpconfig, bgpconfigurations, bgpconfigs |
| Deep packet inspection | deeppacketinspection, deeppacketinspections |
| BGP peer | bgppeer, bgppeers, bgpp, bgpps, bp, bps |
| Felix configuration | felixconfiguration, felixconfig, felixconfigurations, felixconfigs |
| Global alert | globalalert, globalalerts |
| Global network policy | globalnetworkpolicy, globalnetworkpolicies, gnp, gnps |
| Global network set | globalnetworkset, globalnetworksets |
| Global report | 지원 안 됨 |
| Global threat feed | globalthreatfeed, globalthreatfeeds |
| Host endpoint | hostendpoint, hostendpoints, hep, heps |
| IP pool | ippool, ippools, ipp, ipps, pool, pools |
| IP reservation | ipreservation, ipreservations, reservation, reservations |
| Kubernetes controllers configuration | kubecontrollersconfiguration, kubecontrollersconfig |
| License key | 지원 안 됨 |
| Managed cluster | 지원 안 됨 |
| Network policy | networkpolicy, networkpolicies, policy, np, policies, pol, pols |
| Network set | networkset, networksets, netsets |
| Node | node, nodes, no, nos |
| Packet capture | packetcapture, packetcaptures |
| Profiles | profile, profiles, pro, pros |
| Remote cluster configuration. | remoteclusterconfiguration, remoteclusterconfigurations, remoteclusterconfig, remoteclusterconfigs, rcc |
| Staged global network policy | stagedglobalnetworkpolicy, stagedglobalnetworkpolicies, sgnp, sgnps |
| Staged Kubernetes network policy. | stagedkubernetesnetworkpolicy, stagedkubernetesnetworkpolicies, stagedkubernetespolicy, sknp, stagedkubernetespolicies, skpol, skpols |
| Staged network policy. | stagednetworkpolicy, stagednetworkpolicies, stagedpolicy, snp, stagedpolicies, spol, spols |
| Tier | tier, tiers |
| Workload endpoint | workloadendpoint, workloadendpoints, wep, weps |