apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: nats-operator
spec:
  replicas: 1
  template:
    metadata:
      labels:
        name: nats-operator
    spec:
      containers:
      - name: nats-operator
        image: nats-io/nats-operator:latest
        imagePullPolicy: Always
        env:
        - name: MY_POD_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        - name: MY_POD_NAME
          valueFrom:
            fieldRef:
              fieldPath: metadata.name

apiVersion: apps/v1beta2
kind: Deployment
metadata:
  name: nats-operator
spec:
  replicas: 1
  selector:
    matchLabels:
      name: nats-operator
  template:
    metadata:
      labels:
        name: nats-operator
    spec:
      containers:
      - name: nats-operator
        image: nats-io/nats-operator:latest
        imagePullPolicy: Always
        env:
        - name: MY_POD_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        - name: MY_POD_NAME
          valueFrom:
            fieldRef:
              fieldPath: metadata.name

Switch to use apps/v1beta2 for the nats-operator
Switch to use apps/v1beta2 for the nats-operator
