Created
February 13, 2019 19:04
-
-
Save lukehoban/b83f05404b1794d585c3a56574e2b7c8 to your computer and use it in GitHub Desktop.
Revisions
-
lukehoban created this gist
Feb 13, 2019 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ import * as awsx from "@pulumi/awsx"; import * as eks from "@pulumi/eks"; import * as k8s from "@pulumi/kubernetes"; // Create an AWS VPC and EKS cluster const vpc = new awsx.Vpc("vpc", { usePrivateSubnets: false }); const cluster = new eks.Cluster("cluster", { vpcId: vpc.vpcId, subnetIds: vpc.subnetIds, }); // Deploy a Helm chart into the EKS cluster. const node = new k8s.helm.v2.Chart("node", { repo: "bitnami", chart: "node", version: "4.0.1", values: { serviceType: "LoadBalancer", } }, { providers: { kubernetes: cluster.provider } }); This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ let redisMasterLabels = { app: "redis-master" }; let redisMasterDeployment = new k8s.apps.v1.Deployment("redis-master", { spec: { selector: { matchLabels: redisMasterLabels }, template: { metadata: { labels: redisMasterLabels }, spec: { containers: [ { name: "master", image: "k8s.gcr.io/redis:e2e", resources: { requests: { cpu: "100m", memory: "100Mi" } }, ports: [{ containerPort: 6379 }] } ] } } } }); This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,24 @@ import * as pulumi from "@pulumi/pulumi"; import * as k8sjs from "./k8sjs"; let config = new pulumi.Config(); let redisMaster = new k8sjs.ServiceDeployment("redis-master", { image: "k8s.gcr.io/redis:e2e", ports: [6379] }); let redisReplica = new k8sjs.ServiceDeployment("redis-replica", { image: "gcr.io/google_samples/gb-redisslave:v1", ports: [6379] }); let frontend = new k8sjs.ServiceDeployment("frontend", { replicas: 3, image: "gcr.io/google-samples/gb-frontend:v4", ports: [80], allocateIpAddress: true, isMinikube: config.getBoolean("isMinikube") }); export let frontendIp = frontend.ipAddress;