k8s 및 인프라/k8s

calico설치 &upgrade

DanielZZI 2024. 3. 18. 23:30
728x90

tigera-operator를 활용한 calcio권장

*버전 확인: https://docs.tigera.io/calico/latest/getting-started/kubernetes/requirements

 

System requirements | Calico Documentation

Review requirements before installing Calico to ensure success.

docs.tigera.io

 

* calico 3.26을 쓰다가 버그문제로,3.27로 업글 (이거였나, sts, deployment삭제하면, pod삭제가안됨..https://github.com/projectcalico/calico/issues/5715 )

 

 

 

1.이미지준비

*폐쇄망에서는 operator이미지 받고,, 아래명령어로 필요한 이미지리스트 추출한다.

sudo docker run quay.io/tigera/operator:v1.30.0 --print-images=list

 

2.tigera-operator수정

아래 파일 다운받아서 수정..

https://raw.githubusercontent.com/projectcalico/calico/v3.27.0/manifests/tigera-operator.yaml

 

3.custom-resources.yaml 수정

https://raw.githubusercontent.com/projectcalico/calico/v3.27.0/manifests/custom-resources.yaml

 

아래부분들 적절히 수정

- blockSize: 26

  cidr: 10.100.0.0/16

imagePath: 

registry:

 

4. calico셋업

operator 설치 후 custom-resource를 설치하면된다.

 

#확인

kubectl get po -n calico-system

 

 

 

calico upgrade

참고: https://docs.tigera.io/calico/latest/operations/upgrading/kubernetes-upgrade#upgrading-an-installation-that-uses-the-operator

 

Upgrade Calico on Kubernetes | Calico Documentation

Upgrade to a newer version of Calico for Kubernetes.

docs.tigera.io

 

 

tigera-operator.yaml 파일을 적절히 수정 (이미지경로 등)

 

kubectl replace -f <tigera-operator.yaml 경로>