Skip to content

ArgoCD 構築手順

ArgoCD を構築します。

cf. https://argo-cd.readthedocs.io/en/stable/getting_started/

構築手順

  • ArgoCD をインストールします:
kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
  • ArgoCD の API Server にアクセスできるよう、サービスタイプを変更します:
# ロードバランサがある場合 type: LoadBalancer
kubectl patch svc argocd-server -n argocd -p '{"spec": {"type": "LoadBalancer"}}'

# ロードバランサがない場合 type: NodePort
kubectl patch svc argocd-server -n argocd -p '{"spec": {"type": "NodePort", "ports": [{"name": "http", "port": 80, "protocol": "TCP", "targetPort": 8080, "nodePort": 30080}]}}'
  • ArgoCD CLI をインストールします:
curl -sSL -o argocd-linux-amd64 https://github.com/argoproj/argo-cd/releases/latest/download/argocd-linux-amd64
sudo install -m 555 argocd-linux-amd64 /usr/local/bin/argocd
rm argocd-linux-amd64
  • CLI がインストールされていることを確認します:
argocd version
  • admin ユーザのパスワードを取得します:
argocd admin initial-password -n argocd
  • admin ユーザでログインします:
argocd login {ARGOCD_SERVER}
  • admin ユーザのパスワードを更新します:
argocd account update-password