Weave Flux 설치

조회 1,029 · 댓글 0
JJanarius작성자2022년 1월 20일
helm version --short

kubectl apply -f https://raw.githubusercontent.com/fluxcd/helm-operator/master/deploy/crds.yaml

kubectl create namespace flux

helm repo add fluxcd https://charts.fluxcd.io


여기까지 하면 helm에 Flux 차트 repo 추가된다.

그리고 아래 <> 부분에는 사용자의 Git(Code Commit) 자격 증명을 넣는다.

GIT_AUTHUSER=<your Git User Name>

TEMP_PASSWORD=<your Git Password>


GIT_AUTHKEY=$(python -c "import urllib; print urllib.quote('''$TEMP_PASSWORD''', safe='')")

echo $GIT_AUTHUSER $GIT_AUTHKEY


지금부터는 k8s secret을 생성한다.

kubectl create secret generic flux-git-auth \

-n flux \
--from-literal=GIT_AUTHUSER=$GIT_AUTHUSER \
--from-literal=GIT_AUTHKEY=$GIT_AUTHKEY


kubectl describe secret -n flux flux-git-auth


이제 helm 구성을 업데이트한다.

helm upgrade -i flux fluxcd/flux \

--set git.url='https://$(GIT_AUTHUSER):$(GIT_AUTHKEY)@git-codecommit.us-west-2.amazonaws.com/v1/repos/k8s-config' \
--set env.secretName=flux-git-auth \
--set git.branch=master \
--namespace flux


helm operator를 설치한다.

helm upgrade -i helm-operator fluxcd/helm-operator \

--set helm.versions=v3 \
--set git.ssh.secretName=flux-git-deploy \
--namespace flux


kubectl get pods -n flux


fluxctl을 설치한다.

sudo wget -O /usr/local/bin/fluxctl https://github.com/fluxcd/flux/releases/download/1.24.0/fluxctl_linux_amd64

sudo chmod 755 /usr/local/bin/fluxctl

fluxctl version

로그인 후 답글을 남길 수 있습니다.