Installing Argo CD
Argo CD
Getting started
-
If you do not have the Yandex Cloud command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the
--folder-name
or--folder-id
parameter. -
Make sure that the security groups for the Managed Service for Kubernetes cluster and its node groups are configured correctly. If any rule is missing, add it.
Warning
The configuration of security groups determines the performance and availability of the cluster and the services and applications running in it.
-
Install kubectl
and configure it to work with the created cluster.
Installation using Yandex Cloud Marketplace
- Go to the folder page
and select Managed Service for Kubernetes. - Click the name of the cluster you need and select the
Marketplace tab. - Under Application available for installation, select Argo CD and click Go to install.
- Configure the application:
- Namespace: Select a namespace for Argo CD or create a new one.
- Application name: Specify the app name.
- Click Install.
- Wait for the application to change its status to
Deployed
.
Installation using a Helm chart
-
Install Helm
v3.8.0 or higher. -
To install a Helm chart
with Argo CD, run the following command:helm pull oci://cr.yandex/yc-marketplace/yandex-cloud/argo/chart/argo-cd \ --version 7.3.11-2 \ --untar && \ helm install \ --namespace <namespace> \ --create-namespace \ argo-cd ./argo-cd/
Note
If you are using a Helm version below 3.8.0, append the
export HELM_EXPERIMENTAL_OCI=1 && \
string to the command to enable Open Container Initiative (OCI) support in the Helm client.
Access to the application
You can open Argo CD via localhost or dedicated IP address. The first method is easier to configure and does not require additional network load balancer costs. The second method allows you to get permanent access to Argo CD. The application is available through localhost
only for as long as port redirection is active.
Before you set up access to Argo CD, get the administrator password (admin
):
kubectl --namespace <namespace> get secret argocd-initial-admin-secret \
--output jsonpath="{.data.password}" | base64 -d
You will need the password for authorization in Argo CD.
Opening the application via localhost
-
Configure Argo CD port redirection to your local computer:
kubectl port-forward service/<app_name>-argocd-server \ --namespace <namespace> 8080:443
In the command, specify the application name you had set during installation.
-
Follow the
https://localhost:8080
link and log in with administrator credentials.
Opening the application via a dedicated IP address
-
Save the following specification for creating a
LoadBalancer
type service to a file namedload-balancer.yaml
. This will create you a Yandex Network Load Balancer:apiVersion: v1 kind: Service metadata: name: argocd-load-balancer namespace: <namespace> spec: type: LoadBalancer ports: - port: 443 name: load-balancer-port-ssl targetPort: 8080 # Selector Kubernetes label used in the Deployment object named <application_name>-argocd-server. selector: app.kubernetes.io/name: argocd-server
In the specification, specify the namespace you installed Argo CD in.
The specification giving no IP address, the load balancer will get a dynamic public IP address. You can add a field named
spec.loadBalancerIP
and specify a pre-reserved static IP address in it.For details on the specification, see this service reference.
-
Apply the specification and create a network load balancer:
kubectl apply -f load-balancer.yaml --namespace <namespace>
-
Get the IP address of the load balancer that you created:
Management console-
In the management console
, select the folder the Managed Service for Kubernetes cluster is deployed in. -
Select Network Load Balancer.
The Load balancers section shows a network load balancer with the
k8s
prefix in its name and the unique Kubernetes cluster ID in its description. -
Copy the IP address field value for the load balancer of interest.
-
-
Follow the
https://<load_balancer_IP_address>
link and log in with administrator credentials.