What Is GitOps ● “GitOps is a way to do Continuous Delivery, it works by using Git as a source of truth for declarative infrastructure and workloads. For Kubernetes this means using git push instead of kubectl create/apply or helm install/upgrade.” ○ ● “In the “GitOps” model, we use Git to solve for divergence and convergence, aided by a set of “diff” and “sync” tools that compare intended with actual state.” ○
And more.. ※GitOpsの全てを説明する時間はないので、興味がある方は以下をご参照ください ● Posts in category gitops ○ ● Git push all the things ○ ● Modern best practices for high velocity app dev using cloud native tools ○ native-tools>
$ kubectl get pods,services -n flux-test NAME READY STATUS RESTARTS AGE pod/flux-7bb966d77d-nmt5n 1/1 Running 0 6d pod/memcached-6879d9d8d-m4cmt 1/1 Running 1 6d NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE service/memcached ClusterIP None 11211/TCP 7d A. Fluxセットアップ直後の状態 ○ Flux以外のリソースはない状態 ○ Flux監視対象のGitリポジトリ上には、まだ何もYAMLがない状態 ① Git上のmanifest(YAML)を更新したら自動デプロイ
Flux Tips ● イメージを自動更新するタグは正規表現などでフィルタ可能 ○ ● Helmにも対応 ○ ● Fluxで検知したイベントの Slack通知機能はWeave Cloudのみ ○ 代わりにfluxcloudが使えそう “Fluxcloud is a valid upstream for Weave, allowing you to send Flux events to Slack or a webhook without using Weave Cloud.”
Jenkins X “Jenkins X then automates the management of the Environments and the Promotion of new versions of Applications between Environments via GitOps.”
GitOpsを謳っている他のCDツールも試したい Argo CD “Argo CD is a declarative, GitOps continuous delivery tool for Kubernetes.”