Introduction to Argo CD¶
Let's see how you can install Argo CD in you kubernetes cluster.
Step 1: Create Namespace for Arogo CD¶
First, let's create a namespace for Argo CD:
Step 2: Install Argo CD¶
Now, let's install Argo CD in the argocd
namespace that we created:
# Install Argo CD
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
Step 3: Verify Argo CD Installation¶
Step 4: Access Argo CD on Local Machine¶
Let's use port forward to access Argo CD on local machine:
Visit localhost:80
on your local host machine and you will be able to access Argo CD.
Step 5: Retrieve Login Credentials¶
The initial password for the admin account/user is auto-generated and stored as clear text in the field password
in a secret named argocd-initial-admin-secret
in your Argo CD installation namespace.
Let's retrieve the password from the argocd-initial-admin-secret
as follows:
Copy the value of the password
field from the output of the above command. The password is base64 encoded.
Let's decode the password:
Now, use admin
user with this password to login to Argo CD.
Argo CD also provides Argo CD CLI to perform operations using CLI. The CLI lets you interact with the Argo CD server using a terminal window.
Step 6: Install Argo CD CLI¶
Use the following commands to install the Argo CD CLI:
curl -sSL -o argocd-linux-amd64 https://github.com/argoproj/argo-cd/releases/latest/download/argocd-linux-amd64
sudo install -m 555 argocd-linux-amd64 /usr/local/bin/argocd
rm argocd-linux-amd64
Verify CLI installation:
Let's get the initial admin password using the Argo CD CLI:
Login using CLI:
List accounts and its details:
Step 7: Create New User¶
Let's create new user reyansh
. For this we need to update the argocd-cm
ConfigMap.
# set editor to nano
export KUBE_EDITOR=nano
# Edit configmap
kubectl edit configmap argocd-cm -n argocd
Add the following in the argocd-cm
ConfigMap:
Verify if user was created:
# List accounts
argocd account list
# Get user specific details
argocd account get --account reyansh
Set user password:
argocd account update-password \
--account <name> \
--current-password <current-user-password> \
--new-password <new-user-password>
If you are managing users as the admin user, current-user-password
should be the current admin password.
As soon as additional users are created it is recommended to disable admin user. Update the configmap as follows:
References: