youkan | インフラ集会 2024年1月
GitOpsとArgoCDの基本を理解する
Gitをシングルソースオブトゥルースとして インフラとアプリケーションを管理する手法
┌─────────┐ push ┌─────────┐ │ Dev │ ──────────> │ Git │ └─────────┘ └────┬────┘ │ sync ┌────▼────┐ │ ArgoCD │ └────┬────┘ │ deploy ┌────▼────┐ │ K8s │ └─────────┘
# namespace作成 kubectl create namespace argocd # ArgoCDインストール kubectl apply -n argocd -f \ https://raw.githubusercontent.com/argoproj/\ argo-cd/stable/manifests/install.yaml # CLIインストール brew install argocd
apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: my-app namespace: argocd spec: project: default source: repoURL: https://github.com/user/repo.git targetRevision: HEAD path: manifests destination: server: https://kubernetes.default.svc namespace: my-app syncPolicy: automated: prune: true selfHeal: true
注意点
GitOps、一緒に語りましょう!
@youkan