1. Answers
  2. Deploying Argo CD and Elasticsearch on Kubernetes

How do I deploy Argo CD and Elasticsearch on Kubernetes?

In this guide, we will deploy Argo CD and Elasticsearch on a Kubernetes cluster using Pulumi. Argo CD is a declarative, GitOps continuous delivery tool for Kubernetes, and Elasticsearch is a distributed, RESTful search and analytics engine. We will create the necessary Kubernetes resources to deploy both applications.

import * as pulumi from "@pulumi/pulumi";
import * as k8s from "@pulumi/kubernetes";

// Create a namespace for Argo CD
const argoNamespace = new k8s.core.v1.Namespace("argo-namespace", {
    metadata: { name: "argo" },
});

// Deploy Argo CD using the official Helm chart
const argoCd = new k8s.helm.v3.Chart("argo-cd", {
    chart: "argo-cd",
    version: "4.5.2",
    fetchOpts: {
        repo: "https://argoproj.github.io/argo-helm",
    },
    namespace: argoNamespace.metadata.name,
});

// Create a namespace for Elasticsearch
const esNamespace = new k8s.core.v1.Namespace("elasticsearch-namespace", {
    metadata: { name: "elasticsearch" },
});

// Deploy Elasticsearch using the official Helm chart
const elasticsearch = new k8s.helm.v3.Chart("elasticsearch", {
    chart: "elasticsearch",
    version: "7.10.1",
    fetchOpts: {
        repo: "https://helm.elastic.co",
    },
    namespace: esNamespace.metadata.name,
});

// Export the Argo CD server URL
export const argoCdUrl = argoCd.getResource("v1/Service", "argo/argo-cd-server").status.loadBalancer.ingress[0].hostname;

// Export the Elasticsearch URL
export const elasticsearchUrl = elasticsearch.getResource("v1/Service", "elasticsearch/elasticsearch-master").status.loadBalancer.ingress[0].hostname;

Key Points

  • We created namespaces for Argo CD and Elasticsearch.
  • We deployed Argo CD and Elasticsearch using their respective Helm charts.
  • We exported the URLs for accessing the Argo CD server and the Elasticsearch service.

Summary

In this guide, we deployed Argo CD and Elasticsearch on a Kubernetes cluster using Pulumi. We created the necessary namespaces and used Helm charts to deploy both applications. Finally, we exported the URLs to access the Argo CD server and the Elasticsearch service.

Deploy this code

Want to deploy this code? Sign up for a free Pulumi account to deploy in a few clicks.

Sign up

New to Pulumi?

Want to deploy this code? Sign up with Pulumi to deploy in a few clicks.

Sign up