forked from pulumi/examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.ts
23 lines (17 loc) · 736 Bytes
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Copyright 2016-2020, Pulumi Corporation. All rights reserved.
import * as aws from "@pulumi/aws";
import * as k8s from "@pulumi/kubernetes";
import * as pulumi from "@pulumi/pulumi";
import * as eksdistro from "./eksdistro";
const store = new aws.s3.Bucket("kops-state-store");
const cluster = new eksdistro.Cluster("cluster", {
name: "luke.cluster.pulumi-demos.net",
state: pulumi.interpolate`s3:https://${store.id}`,
});
const k8sProvider = new k8s.Provider("provider", { kubeconfig: cluster.kubeconfig });
const pod = new k8s.core.v1.Pod("mypod", {
spec: {
containers: [{ name: "echo", image: "k8s.gcr.io/echoserver:1.4" }],
},
}, { provider: k8sProvider });
export const kubeconfig = cluster.kubeconfig;