<p>Trying to deploy <code>heapster-controller</code> to get Heapster + Graphana + InfluxDB working for Kubernetes. Getting error messages while trying ot deploy using heapster-controller.yaml file:</p>

<p><strong>heapster-controller.yaml</strong></p>

<p><code>
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: heapster-v1.1.0-beta1
  namespace: kube-system
  labels:
    k8s-app: heapster
    kubernetes.io/cluster-service: "true"
spec:
  replicas: 1
  selector:
    matchLabels:
      k8s-app: heapster
  template:
    metadata:
      labels:
        k8s-app: heapster
        kubernetes.io/cluster-service: "true"
    spec:
      containers:
        - image: gcr.io/google_containers/heapster:v1.1.0-beta1
          name: heapster
          resources:
            # keep request = limit to keep this container in guaranteed class
            limits:
              cpu: 100m
              memory: 200m 
            requests:
              cpu: 100m
              memory: 200m 
          command:
            - /heapster
            - --source=kubernetes.summary_api:''
            - --sink=influxdb:http://monitoring-influxdb:8086
            - --metric_resolution=60s
        - image: gcr.io/google_containers/heapster:v1.1.0-beta1
          name: eventer
          resources:
            # keep request = limit to keep this container in guaranteed class
            limits:
              cpu: 100m
              memory: 200m 
            requests:
              cpu: 100m
              memory:  200m
          command:
            - /eventer
            - --source=kubernetes:''
            - --sink=influxdb:http://monitoring-influxdb:8086
        - 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=200
            - --extra-memory=200Mi
            - --threshold=5
            - --deployment=heapster-v1.1.0-beta1
            - --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=200
            - --extra-memory=200Ki
            - --threshold=5
            - --deployment=heapster-v1.1.0-beta1
            - --container=eventer
            - --poll-period=300000
</code></p>

<p>Deployment goes through, but then I get error:</p>

<p><code>
[root@node236 influxdb]# kubectl get pods -o wide --namespace=kube-system
NAME                                     READY     STATUS              RESTARTS   AGE       NODE
heapster-v1.1.0-beta1-3082378092-t6inb   2/4       RunContainerError   0          1m        node262.local.net
[root@node236 influxdb]#
</code></p>

<p>Display log for the failed container:</p>

<p><code>
[root@node236 influxdb]# kubectl logs --namespace=kube-system heapster-v1.1.0-beta1-3082378092-t6inb
Error from server: a container name must be specified for pod heapster-v1.1.0-beta1-3082378092-t6inb, choose one of: [heapster eventer heapster-nanny eventer-nanny]
[root@node236 influxdb]#
</code></p>

<p>Where am I possibly going wrong ?</p>

<p>Any feedback appreaciated!!</p>

<p>Alex</p>

<p>The correct syntax is <code>kubectl logs &lt;pod&gt; &lt;container&gt;</code>.</p>

<p>In your example, <code>kubectl logs heapster-v1.1.0-beta1-3082378092-t6inb heapster --namespace=kube-system</code> will show the logs of the "heapster" container within the named pod.</p>
