apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: nats
  labels:
    component: nats
spec:
  template:
    metadata:
      labels:
        component: nats
    spec:
      containers:
      - name: nats
        image: quay.io/pires/docker-nats:0.9.4
        imagePullPolicy: Always
        volumeMounts:
          - name: tls-volume
            mountPath: /etc/nats/tls
        env:
        - name: EXTRA
          value: -DV
        - name: TLS
          value: "true"
        - name: TLSCERT
          value: /etc/nats/tls/nats.pem
        - name: TLSKEY
          value: /etc/nats/tls/nats-key.pem
        ports:
        - containerPort: 4222
          name: client
        - containerPort: 6222
          name: cluster
        - containerPort: 8222
          name: monitor
        livenessProbe:
          tcpSocket:
            port: 8222
          initialDelaySeconds: 10
          timeoutSeconds: 5
        readinessProbe:
          tcpSocket:
            port: 8222
          initialDelaySeconds: 10
          timeoutSeconds: 5
      volumes:
      - name: tls-volume
        secret:
          secretName: tls-nats

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: nats
  labels:
    component: nats
spec:
  template:
    metadata:
      labels:
        component: nats
    spec:
      containers:
      - name: nats
        image: quay.io/pires/docker-nats:0.9.4
        imagePullPolicy: Always
        volumeMounts:
          - name: tls-volume
            mountPath: /etc/nats/tls
        env:
        - name: EXTRA
          value: -DV
        - name: TLS
          value: "true"
        - name: TLSCERT
          value: /etc/nats/tls/nats.pem
        - name: TLSKEY
          value: /etc/nats/tls/nats-key.pem
        ports:
        - containerPort: 4222
          name: client
        - containerPort: 6222
          name: cluster
        - containerPort: 8222
          name: monitor
        livenessProbe:
          exec:
            command:
            - /route_checker
          initialDelaySeconds: 10
          timeoutSeconds: 5
        readinessProbe:
          tcpSocket:
            port: 8222
          initialDelaySeconds: 10
          timeoutSeconds: 5
      volumes:
      - name: tls-volume
        secret:
          secretName: tls-nats

Fix livenessProbe for TLS deployment.
Fix livenessProbe for TLS deployment.
