Deploying application on Kubernetes Through ArgoCD
Argocd is one of the continuous deployment tools.
It will pull the code from repos whenever there is a change and deploy the applications with those changes.
It is deployed through the below steps on a Kubernetes cluster.
To deploy the Kubernetes cluster refer to the scripts in this repo.
https://github.com/Invisiblelad/Intialization-scripts/tree/master
Step:1
Create a namespace:
kubectl create namespace argocd
Step:2
Deploy the argocd with this command
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/v2.4.7/manifests/install.yaml
Step:3
To access the web UI of argocd we have to expose it through either NodePort or Loadbalancer.
kubectl patch svc argocd-server -n argocd -p '{"spec": {"type": "NodePort"}}'
Step:4
Access the Web GUI with master ip followed by port.The default username will be admin for password follow below command.
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d
Step:5
Creation of application on argocd.We can deploy the application either from github or through helm charts.In this we are showing through git hub.
\=> Click on New app-> Application Name (Anything) -
\=> Project Name will be default
Provide the github url where your code is present. in this example you can checkout this code.
https://github.com/Invisiblelad/hello-world.git
Click on create then the application will be created.