Deploy the jaeger-all-in-one-opentelemetry helm chart on Digital Ocean Kubernetes Service
TypeScriptTo deploy the
jaeger-all-in-one-opentelemetry
Helm chart on Digital Ocean Kubernetes Service using Pulumi, you'll need to follow these steps:-
Set up a Kubernetes Cluster on Digital Ocean: Use the
digitalocean.KubernetesCluster
resource to create and configure a new Kubernetes cluster. Specify the region, number of nodes, and the size of each node as required for your deployment. -
Install the Helm Chart: Use the
kubernetes.helm.v3.Chart
resource to deploy the Helm chart to your Kubernetes cluster. You will provide it with the name of the chart (jaeger-all-in-one-opentelemetry
) and additional configurations, such as values to override default chart settings if needed.
Here is a detailed TypeScript program to create these resources:
import * as pulumi from '@pulumi/pulumi'; import * as digitalocean from '@pulumi/digitalocean'; import * as kubernetes from '@pulumi/kubernetes'; // Step 1: Create a Kubernetes cluster on DigitalOcean const cluster = new digitalocean.KubernetesCluster('do-cluster', { // The region where Kubernetes cluster should be created region: 'nyc3', // Version of Kubernetes to use for the cluster version: 'latest', // Define the node pool with the size and number of nodes nodePool: { size: 's-2vcpu-2gb', name: 'default-pool', nodeCount: 2, // Additional configuration can be provided here }, }); // Step 2: Deploy the Jaeger Helm Chart on the Kubernetes cluster const jaegerChart = new kubernetes.helm.v3.Chart('jaeger', { // Set the namespace where the chart will be installed or use the default namespace: 'default', // We specify the chart name chart: 'jaeger', // This fetches the jaeger-all-in-one-opentelemetry chart from the Helm registry fetchOpts: { repo: 'https://jaegertracing.github.io/helm-charts', }, // Provide any value overrides for the chart here // For example: values: { "agent": { "hostPort": "5775" } } values: {}, // The resource is created once the Kubernetes cluster is available }, { dependsOn: cluster }); // Export the cluster's kubeconfig as an output export const kubeConfig = cluster.kubeConfigs[0].rawConfig; // Export the public endpoint for accessing Jaeger UI export const jaegerEndpoint = jaegerChart.getResourceProperty( "v1/Service", "default", "jaeger-query", "status" ).apply(status => status.loadBalancer.ingress[0].ip);
This program performs the following actions:
- It initializes a new Kubernetes cluster in the DigitalOcean region
nyc3
with nodes specified bynodePool
. - It includes a configuration option for
version: 'latest'
, which will pull the latest Kubernetes version supported by DigitalOcean at the time of creation. - It creates a helm chart resource using the
kubernetes.helm.v3.Chart
class, referencing the Jaeger Helm chart from its Helm repository. - It exports the raw kubeconfig of the cluster, which will be used to configure
kubectl
or other Kubernetes tooling to interact with the cluster. You should treat this output as sensitive, especially in a production environment. - It exports the Jaeger UI endpoint by querying the load balancer status of the
jaeger-query
service created by the Helm chart.
To use this Pulumi program, you should have Pulumi CLI installed and configured with the necessary access tokens for DigitalOcean. Save the program in a TypeScript file (e.g.,
index.ts
), then run it withpulumi up
to create the resources described above.Please replace
"default"
with the required namespace where you would like to deploy the Jaeger Helm Chart if you are not using the default namespace. Thevalues
object should be populated with any other Helm value overrides you need to apply to the default chart configurations.Remember that you'll need to handle Docker images (if necessary) and any other dependencies that Jaeger may have outside of this basic deployment. Always refer to the Jaeger Helm chart documentation for more detailed information on configuration options and prerequisites.
-