ArgoCD is a popular tool for Continuous Deployment (CD) of Kubernetes applications. It allows users to automate the deployment and management of applications in a Kubernetes cluster. Helm is a popular package manager for Kubernetes, which helps in installing, upgrading, and managing applications. In this article, we will learn how to deploy a Helm chart using ArgoCD.
Table of Contents
- Pre-requisites
- Installing ArgoCD
- Configuring ArgoCD
- Deploying Helm Chart with ArgoCD
- Verifying the Deployment
Pre-requisites:
- A Kubernetes cluster
- Helm installed on the local system
- kubectl installed on the local system
Installing ArgoCD:
- Create a namespace for ArgoCD:
kubectl create namespace argocd
- Add the ArgoCD repository to the Helm client:
helm repo add argo https://argoproj.github.io/argo-helm
- Install ArgoCD using Helm:
helm install argocd argo/argo-cd -n argocd
Configuring ArgoCD:
- Get the ArgoCD admin password:
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d
- Login to the ArgoCD Web UI using the admin password:
argocd login <ARGOCD_SERVER> --username=admin --password=<ARGOCD_PASSWORD>
- Create a new application using the ArgoCD Web UI, by specifying the Helm chart location, values file, and target namespace.
Deploying Helm Chart with ArgoCD:
- Create a Helm values file with the required configuration:
cat <<EOF > values.yaml
replicaCount: 3
image:
repository: nginx
tag: stable
pullPolicy: IfNotPresent
service:
name: nginx
type: ClusterIP
port: 80
EOF - Install the Helm chart using the values file:
helm install nginx stable/nginx -f values.yaml
- Sync the ArgoCD application to deploy the Helm chart:
argocd app sync <APP_NAME>
Verifying the Deployment:
- Get the list of pods in the target namespace:
kubectl get pods -n <NAMESPACE>
- Check the logs of the deployed application:
kubectl logs <POD_NAME> -n <NAMESPACE>
In this article, we learned how to deploy a Helm chart using ArgoCD. With ArgoCD, we can automate the deployment and management of Helm applications in a Kubernetes cluster. We also learned how to configure ArgoCD and deploy a sample Helm chart using a values file. With ArgoCD, we can ensure that our Kubernetes applications are deployed and managed in a consistent and efficient manner.
Related Searches and Questions asked:
That's it for this post. Keep practicing and have fun. Leave your comments if any.
0 Comments