Kubernetes GitOps for Management Cluster(s)
Local - Create cluster.
kind create cluster --config "configuration.yaml"
kubectl config set-context "$(printf "%s-kind" "kind")"
Bootstrap.
flux bootstrap github --repository "https://github.com/iac-factory/cluster-management" \
--owner "iac-factory" \
--private "false" \
--personal "false" \
--path "clusters/local"
Sync local cluster repository's vendors
.
git submodule update --remote --recursive
Add kustomization.yaml
to new cluster directory.
cat << EOF > ./vendors/cluster-management/clusters/local/kustomization.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources: []
EOF
Update.
git submodule foreach "git add . && git commit --message \"Git Submodule Update(s)\" && git push -u origin HEAD:main"