github.com/terraform-modules-krish/terratest@v0.29.0/examples/kubernetes-hello-world-example/hello-world-deployment.yml (about) 1 --- 2 # website::tag::1:: Deploy the training/webapp Docker Container: https://hub.docker.com/r/training/webapp/ 3 apiVersion: apps/v1 4 kind: Deployment 5 metadata: 6 name: hello-world-deployment 7 spec: 8 selector: 9 matchLabels: 10 app: hello-world 11 replicas: 1 12 template: 13 metadata: 14 labels: 15 app: hello-world 16 spec: 17 containers: 18 # website::tag::2:: The container runs a Python webapp on port 5000 that responds with "Hello, World!" 19 - name: hello-world 20 image: training/webapp:latest 21 ports: 22 - containerPort: 5000 23 --- 24 # website::tag::3:: Expose the Python webapp on port 5000 via a Kubernetes LoadBalancer. 25 kind: Service 26 apiVersion: v1 27 metadata: 28 name: hello-world-service 29 spec: 30 selector: 31 app: hello-world 32 ports: 33 - protocol: TCP 34 targetPort: 5000 35 port: 5000 36 type: LoadBalancer