Cluster API Operator 설치 가이드
설치
경고
cert-manager가 설치되어있어야 합니다.
helm repo add capi-operator https://kubernetes-sigs.github.io/cluster-api-operator
helm repo update capi-operator \
&& helm search repo capi-operator/cluster-api-operator -l | head -n 10
helm pull capi-operator/cluster-api-operator --version 0.22.0
helm show values capi-operator/cluster-api-operator --version 0.22.0 > cluster-api-operator-0.22.0.yaml
cluster-api-operator-values.yaml
core:
cluster-api:
version: v1.10.4
namespace: capi-system
createNamespace: true
core
cluster-api
version: <version>
helm template cluster-api-operator capi-operator/cluster-api-operator \
--version 0.22.0 \
-n capi-operator-system \
-f cluster-api-operator-values.yaml \
> cluster-api-operator.yaml
helm upgrade cluster-api-operator capi-operator/cluster-api-operator \
--install \
--history-max 5 \
--version 0.22.0 \
-n capi-operator-system \
-f cluster-api-operator-values.yaml
삭제
for crd in $(kubectl get crd -o name | grep 'cluster.x-k8s.io' |
grep -v 'operator.cluster.x-k8s.io'); do
kind=$(kubectl get "$crd" -o jsonpath='{.spec.names.plural}')
group=$(kubectl get "$crd" -o jsonpath='{.spec.group}')
kubectl delete "$kind.$group" --all --all-namespaces
done
for crd in $(kubectl get crd -o name | grep 'operator.cluster.x-k8s.io'); do
kind=$(kubectl get "$crd" -o jsonpath='{.spec.names.plural}')
group=$(kubectl get "$crd" -o jsonpath='{.spec.group}')
kubectl delete "$kind.$group" --all --all-namespaces
done
helm uninstall cluster-api-operator -n capi-operator-system
kubectl get crd -oname | grep --color=never 'cluster.x-k8s.io' | xargs kubectl delete