# web-app.yaml from http://docs.neterial.io apiVersion: apps/v1 kind: Deployment metadata: name: web-app labels: app.kubernetes.io/name: web-app spec: replicas: 1 selector: matchLabels: app.kubernetes.io/name: web-app template: metadata: labels: app.kubernetes.io/name: web-app spec: containers: - image: nginx name: web-app command: - /bin/sh - -c - "echo 'welcome to my web app!' > /usr/share/nginx/html/index.html && nginx -g 'daemon off;'" --- apiVersion: v1 kind: Service metadata: name: web-app labels: app.kubernetes.io/name: web-app spec: selector: app.kubernetes.io/name: web-app ports: - name: http port: 80 protocol: TCP targetPort: 80 type: LoadBalancer