<p>I am unable to install <a href="https://github.com/kubernetes/kubernetes/blob/release-1.2/cluster/addons/cluster-monitoring/google/heapster-controller.yaml" rel="nofollow">cluster/addons/cluster-monitoring/google/heapster-controller.yaml</a> with Kubernetes 1.2.0 on CoreOS 991.1.0/GCE due to the following error:</p>

<blockquote>
  <p>Error from server: error when creating "/tmp/heapster-controller.yaml": Deployment in version extensions/v1beta1 cannot be handled as a Deployment: json: cannot unmarshal object into Go value of type string
  What is going wrong here?</p>
</blockquote>

<p>My heapster-controller.yaml looks like this (expanded from template):</p>

<pre><code>apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: heapster-v1.0.2
  namespace: kube-system
  labels:
    k8s-app: heapster
    kubernetes.io/cluster-service: "true"
    version: v1.0.2
spec:
  replicas: 1
  selector:
    matchLabels:
      k8s-app: heapster
      version: v1.0.2
  template:
    metadata:
      labels:
        k8s-app: heapster
        version: v1.0.2
    spec:
      containers:
        - image: gcr.io/google_containers/heapster:v1.0.2
          name: heapster
          resources:
            # keep request = limit to keep this container in guaranteed class
            limits:
              cpu: 100m
              memory: 200Mi
            requests:
              cpu: 100m
              memory: 200Mi
          command:
            - /heapster
            - --source=kubernetes.summary_api:''
            - --sink=gcm
            - --metric_resolution=60s
          volumeMounts:
            - name: ssl-certs
              mountPath: /etc/ssl/certs
              readOnly: true
        - image: gcr.io/google_containers/heapster:v1.0.2
          name: eventer
          resources:
            # keep request = limit to keep this container in guaranteed class
            limits:
              cpu: 100m
              memory: 200Mi
            requests:
              cpu: 100m
              memory: 200Mi
          command:
            - /eventer
            - --source=kubernetes:''
            - --sink=gcl
          volumeMounts:
            - name: ssl-certs
              mountPath: /etc/ssl/certs
              readOnly: true
        - image: gcr.io/google_containers/addon-resizer:1.0
          name: heapster-nanny
          resources:
            limits:
              cpu: 50m
              memory: 100Mi
            requests:
              cpu: 50m
              memory: 100Mi
          env:
            - name: MY_POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: MY_POD_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
          command:
            - /pod_nanny
            - --cpu=100m
            - --extra-cpu=0m
            - --memory=200Mi
            - --extra-memory=4Mi
            - --threshold=5
            - --deployment=heapster-v1.0.2
            - --container=heapster
            - --poll-period=300000
        - image: gcr.io/google_containers/addon-resizer:1.0
          name: eventer-nanny
          resources:
            limits:
              cpu: 50m
              memory: 100Mi
            requests:
              cpu: 50m
              memory: 100Mi
          env:
            - name: MY_POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: MY_POD_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
          command:
            - /pod_nanny
            - --cpu=100m
            - --extra-cpu=0m
            - --memory=200Mi
            - --extra-memory=500Ki
            - --threshold=5
            - --deployment=heapster-v1.0.2
            - --container=eventer
            - --poll-period=300000
      volumes:
        - name: ssl-certs
          hostPath:
            path: "/etc/ssl/certs"
</code></pre>

<p>Seems likely to be a mismatch between client and server version. Read more at <a href="https://github.com/kubernetes/kubernetes/issues/22273" rel="nofollow">this GitHub issue</a>.</p>
