본문 바로가기
DevOps/Kubernetes

[Kubernetes] Calicoctl 구성하기

by Yoon_estar 2025. 3. 19.
728x90

개요

Kubernetes 클러스터에서 Metallb를 구성하는 과정 중 speaker가 CrashLoopBackOff 상태가 발생하였습니다.
이를 해결하기 위해 Calico BGP 설정을 확인하기 위한 calicoctl을 설치하였습니다.

 

설치 과정

# curl -O -L https://github.com/projectcalico/calico/releases/download/v3.25.0/calicoctl-linux-amd64
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
 50 56.8M   50 28.9M    0     0  4507k      0  0:00:12  0:00:06  0:00:06 5759k
100 56.8M  100 56.8M    0     0  5020k      0  0:00:11  0:00:11 --:--:-- 5822k

# chmod +x calicoctl-linux-amd64
# sudo mv calicoctl-linux-amd64 /usr/local/bin/calicoctl

# calicoctl version
Client Version:    v3.25.0
Git commit:        3f7fe4d29
Cluster Version:   v3.25.0
Cluster Type:      k8s,bgp,kubeadm,kdd

# calicoctl get bgpconfig -o yaml
apiVersion: projectcalico.org/v3
items: []
kind: BGPConfigurationList
metadata:
  resourceVersion: "504983"
root@kube-master-200:~# calicoctl get bgpconfig -o yaml
apiVersion: projectcalico.org/v3
items: []
kind: BGPConfigurationList
metadata:
  resourceVersion: "504997"

# calicoctl get node -o wide
NAME              ASN       IPV4                 IPV6
kube-master-200   (64512)   192.168.207.200/24
kube-master-210   (64512)   192.168.207.210/24
kube-master-220   (64512)   192.168.207.220/24
kube-worker-204   (64512)   192.168.207.204/24
kube-worker-205   (64512)   192.168.207.205/24