apiVersion: apps/v1
kind: Deployment
metadata:
  name: test-hello-world
  labels:
    app.kubernetes.io/name: hello-world
    app.kubernetes.io/instance: test
    app.kubernetes.io/version: "1.16.0"
spec:
  replicas: 2
  selector:
    matchLabels:
      app.kubernetes.io/name: hello-world
      app.kubernetes.io/instance: test
  template:
    metadata:
      labels:
        app.kubernetes.io/name: hello-world
        app.kubernetes.io/instance: test
    spec:
      serviceAccountName: test-hello-world
      containers:
        - name: hello-world
          image: "nginx:1.16.0"
          imagePullPolicy: IfNotPresent
          ports:
            - name: http
              containerPort: 80
              protocol: TCP
          livenessProbe:
            httpGet:
              path: /
              port: http
          readinessProbe:
            httpGet:
              path: /
              port: http
