GitOps is a way to do Kubernetes cluster management and application delivery using declarative manifests that can be treated as code. This example code will deploy the openfaas helm chart using a set of different tools.
This is a good starting point when first discovering how helm charts/yaml manifests can be managed through a gitops workflow.
At a glance:
-
terraform helm provider is used to deploy openfaas
-
flux operator is used to deploy openfaas
-
argocd operator is used to deploy openfaas
Follow the "How to" instructions for single command deployment using make
Access openfaas UI in: http://localhost:8080/
Note: Flux is installed using terraform flux provider as there is no helm chart available yet.
-
Docker desktop
-
make
-
jq
- terraform helm provider
- argocd
- flux
Important: A $KUBECONFIG env variable is expected:
echo $KUBECONFIG
Verify prerequisites have been installed and Docker Desktop is running.
git clone https://github.com/J0hn-B/gitops_workflow
cd ~/gitops_workflow
-
make terraform
to deploy -
make clean
to clean up
For flux_V2 operator:
-
make flux
to deploy -
make clean
to clean up
For argocd operator:
-
make argocd
to deploy -
make clean
to clean up
Follow the terminal for instructions on how to access openfaas ui
To access argocd web ui:
-
kubectl port-forward svc/argocd-server -n argocd 8090:443 &
-
In your browser: http://localhost:8090/
-
Username:
admin
-
Get argocd password:
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d