Skip to main content

ArgoCD Installation

Follow the steps below to install ArgoCD on the Kubernetes Cluster.
1

Creating namespace

Create a namespace for ArgoCD:
kubectl create namespace argocd
2

ArgoCD installation

Apply ArgoCD manifest files from GitHub repository:
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
3

Monitoring pod status

Monitor the startup of pods:
watch kubectl get pods -n argocd
ArgoCD Pods
4

Configuring service type

Configure the service type as NodePort to access the ArgoCD interface:
kubectl patch svc argocd-server -n argocd -p '{"spec": {"type": "NodePort"}}'
kubectl get svc argocd-server -n argocd
ArgoCD Service
5

Accessing interface

Access the ArgoCD interface using the port address your service exposes externally:
http://<KUBERNETES_WORKER_IP_ADDRESS>:<PORT>
ArgoCD Interface
6

Getting password

Decode and display the password encoded in Base64 format:
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d; echo
The default username is admin. You can log in to the ArgoCD interface using this information.

Git Installation and Repository Configuration

Perform Git installation and configure the repository to push deployment files to GitHub.
1

Git installation

Install the Git package:
sudo apt update
sudo apt install git
git --version
Git may ask you for user information. Configure using the following commands:
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
2

Creating GitHub repository

Create a repository on GitHub to store your deployment files.
3

Configuring remote address

Add it to the git system as a remote address to be able to add files to the GitHub repository.
Authentication Error SolutionIf you get an “Authentication failed” error when using git, follow these steps:
  1. Log in to your GitHub account
  2. Click your profile picture in the top right corner and select “Settings”
  3. Go to “Personal access tokens” under “Developer settings” from the left menu
  4. Click “Generate new token” after “Token”
  5. Give necessary permissions
  6. Go to the bottom of the page and click “Generate token”
  7. Copy the token value and save it to a safe place. You cannot view this value again.
Configure the remote address with the token:
git remote set-url origin https://<USERNAME>:<ACCESS_TOKEN>@<REPO_ADDRESS>
Example: https://test:[email protected]/test/test.git
4

Pushing deployment files

Add the Apinizer Manager deployment yaml file to the git version system and push it to the remote repository:
git init
git add apinizer-api-manager-deployment.yaml
git commit -m "manager add"
git remote add origin <GITHUB_REPO_ADDRESS>
git push -u origin master

Adding Git Repository to ArgoCD

After adding YAML files to the GitHub repository, you need to add this repository address from the ArgoCD interface. There are many connection methods. For the HTTPS method, you need to fill in the following fields. Adding Git Repository
ImportantIf HTTPS is selected as the connection method, write the token value you created in the previous step in the password section.
Git Repository Connection Details

Creating ArgoCD Application

You can automate your deployment processes by creating an application on ArgoCD.
1

Determining application name

Give a name for the application.
2

Sync Policy configuration

If you want ArgoCD to automatically check for updates in the repository, set the SYNC POLICY option to Automatic.
When Automatic sync policy is active, ArgoCD checks every 3 minutes on your behalf.
Creating Application
3

Automatic namespace creation

When you need a namespace that has not been created before in your Kubernetes Cluster, ArgoCD creates a namespace in your Kubernetes cluster with the AUTO-CREATE NAMESPACE option.
Auto-create NamespaceApplication Details

Application Management

ArgoCD visually shows you deployments, replica sets, and pods. You can view real-time log data of pods. Pod Logs Manual Synchronization: You can manually synchronize a change made in your YAML file by pressing the SYNC button. Automatic Synchronization: ArgoCD, which automatically detects every change made in YAML files, automates your deploy processes by updating your pods. This way, while your deploy processes occur more efficiently and quickly, you can prevent manual interventions and errors.