Add a Kubernetes stateless app deployment example
This is a straight port of
We will be turning this into a tutorial on the pulumi.io website.
ADD
kubernetes-ts-nginx/Pulumi.yaml
+name: k8s-nginx
+runtime: nodejs
+description: Example of a Kubernetes Stateless Application Deployment, using Nginx.

ADD
kubernetes-ts-nginx/index.ts
+// Copyright 2016-2018, Pulumi Corporation. All rights reserved.
+
+import * as pulumi from "@pulumi/pulumi";
+import * as k8s from "@pulumi/kubernetes";
+
+let config = new pulumi.Config();
+
+let nginxLabels = { app: "nginx" };
+let nginxDeployment = new k8s.apps.v1.Deployment("nginx", {
+ spec: {
+ selector: { matchLabels: nginxLabels },
+ replicas: config.getNumber("replicas") || 2,
+ template: {
+ metadata: { labels: nginxLabels },
+ spec: {
+ containers: [{
+ name: "nginx",
+ image: "nginx:1.7.9",
+ ports: [{ containerPort: 80 }]
+ }],
+ },
+ },
+ },
+});

ADD
kubernetes-ts-nginx/package.json
+{
+ "name": "k8s-nginx",
+ "version": "0.1.0",
+ "devDependencies": {
+ "@types/node": "^9.3.0"
+ },
+ "dependencies": {
+ "@pulumi/kubernetes": "^0.16.0",
+ "@pulumi/pulumi": "^0.15.0"
+ },
+ "license": "MIT"
+}

ADD
kubernetes-ts-nginx/tsconfig.json
+{
+ "compilerOptions": {
+ "outDir": "bin",
+ "target": "es6",
+ "module": "commonjs",
+ "moduleResolution": "node",
+ "sourceMap": true,
+ "experimentalDecorators": true,
+ "pretty": true,
+ "noFallthroughCasesInSwitch": true,
+ "noImplicitAny": true,
+ "noImplicitReturns": true,
+ "forceConsistentCasingInFileNames": true,
+ "strictNullChecks": true
+ },
+ "files": [
+ "index.ts"
+ ]
+}

Add a Kubernetes stateless app deployment example (#129)

This is a straight port of
https://kubernetes.io/docs/tasks/run-application/run-stateless-application-deployment/.
We will be turning this into a tutorial on the pulumi.io website.