Created
April 1, 2020 13:23
-
-
Save donovanmuller/362e3969fa84d686518174efede5d0ba to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as k8s from "@pulumi/kubernetes"; | |
import {CustomResource} from "@pulumi/kubernetes/apiextensions"; | |
// Install the ECK operator | |
new k8s.yaml.ConfigGroup("eck-operator", { | |
files: "https://download.elastic.co/downloads/eck/1.0.1/all-in-one.yaml", | |
}); | |
// create a new Elasticsearch instance | |
const elastic = new CustomResource("test-elastic", { | |
apiVersion: "elasticsearch.k8s.elastic.co/v1", | |
kind: "Elasticsearch", | |
metadata: { | |
name: "test" | |
}, | |
spec: { | |
version: "7.5.2", | |
nodeSets: [{ | |
name: "default", | |
count: 1, | |
}] | |
} | |
}); | |
// reference the Secret created for the `test` Elasticsearch cluster | |
const elasticUser = new k8s.core.v1.Secret( | |
"test-es-elastic-user", { | |
metadata: { | |
name: "test-es-elastic-user" | |
} | |
}, { | |
import: "default/test-es-elastic-user", | |
dependsOn: elastic | |
}); | |
export const elasticPassword = elasticUser.data; |
Author
donovanmuller
commented
Apr 1, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment