1. Answers
  2. Deploy The Graylog Helm Chart On AWS EKS

Deploy the Graylog Helm Chart on AWS EKS

Introduction

In this guide, we will deploy the Graylog Helm chart on an AWS EKS cluster using Pulumi. Graylog is a powerful log management tool that can be easily deployed using Helm charts. AWS EKS (Elastic Kubernetes Service) is a managed Kubernetes service that makes it easy to run Kubernetes on AWS without needing to install and operate your own Kubernetes control plane.

Step-by-Step Explanation

Step 1: Set up AWS EKS Cluster

  1. Create a VPC: First, we need to create a Virtual Private Cloud (VPC) where our EKS cluster will reside.
  2. Create EKS Cluster: Next, we will create the EKS cluster within the VPC.
  3. Create Node Group: We will then create a node group for the EKS cluster.

Step 2: Deploy Graylog Helm Chart

  1. Add Helm Repository: Add the Helm repository that contains the Graylog chart.
  2. Deploy Helm Chart: Use the Helm provider in Pulumi to deploy the Graylog chart to the EKS cluster.

Summary

By following this guide, you will have a Graylog instance running on an AWS EKS cluster. This setup leverages AWS’s managed Kubernetes service and Helm’s package management capabilities to simplify the deployment process.

Full Code Example

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

// Create a VPC for our EKS cluster
const vpc = new aws.ec2.Vpc("eks-vpc", {
    cidrBlock: "10.0.0.0/16",
    enableDnsHostnames: true,
    enableDnsSupport: true,
    tags: {
        Name: "eks-vpc",
    },
});

// Create subnets for the VPC
const subnet1 = new aws.ec2.Subnet("subnet1", {
    vpcId: vpc.id,
    cidrBlock: "10.0.1.0/24",
    availabilityZone: "us-west-2a",
    mapPublicIpOnLaunch: true,
    tags: { Name: "subnet1" },
});

const subnet2 = new aws.ec2.Subnet("subnet2", {
    vpcId: vpc.id,
    cidrBlock: "10.0.2.0/24",
    availabilityZone: "us-west-2b",
    mapPublicIpOnLaunch: true,
    tags: { Name: "subnet2" },
});

// Create an EKS cluster
const cluster = new eks.Cluster("eks-cluster", {
    vpcId: vpc.id,
    subnetIds: [subnet1.id, subnet2.id],
    instanceType: "t3.medium",
    desiredCapacity: 2,
    minSize: 1,
    maxSize: 3,
    nodeAssociatePublicIpAddress: true,
});

// Deploy the Graylog Helm chart
const graylog = new k8s.helm.v3.Chart("graylog", {
    chart: "graylog",
    version: "1.0.0",
    fetchOpts: {
        repo: "https://helm.graylog.com",
    },
    values: {},
}, { provider: cluster.provider });

export const kubeconfig = cluster.kubeconfig;

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