Search code examples
google-compute-enginekubernetescoreosheapster

Under Kubernetes 1.2, why does Heapster 0.18.2 fail on CoreOS due to unknown source?


Running under Kubernetes 1.2.0/CoreOS 991.1.0/Google Compute Engine, Heapster 0.18.2 fails due to not recognizing the source kubernetes.summary_api. How do I solve this?

The Log of the Failing Heapster Controller

I0415 07:23:58.623481 1 heapster.go:55] /heapster --source=kubernetes.summary_api:'' --sink=gcm --sink=gcmautoscaling --sink=gcl --stats_resolution=30s --sink_frequency=1m I0415 07:23:58.623616 1 heapster.go:56] Heapster version 0.18.2 F0415 07:23:58.623654 1 heapster.go:62] Unknown source: kubernetes.summary_api

The Heapster Kubernetes Service Spec:

apiVersion: v1
kind: ReplicationController
metadata:
  name: heapster-v10
  namespace: kube-system
  labels:
    k8s-app: heapster
    version: v10
    kubernetes.io/cluster-service: "true"
spec:
  replicas: 1
  selector:
    k8s-app: heapster
    version: v10
  template:
    metadata:
      labels:
        k8s-app: heapster
        version: v10
        kubernetes.io/cluster-service: "true"
    spec:
      containers:
        - image: gcr.io/google_containers/heapster:v0.18.2
          name: heapster
          resources:
            limits:
              cpu: 100m
              memory: 300Mi
          command:
            - /heapster
            - --source=kubernetes.summary_api:''
            - --sink=gcm
            - --sink=gcmautoscaling
            - --sink=gcl
            - --stats_resolution=30s
            - --sink_frequency=1m
          volumeMounts:
            - name: ssl-certs
              mountPath: /etc/ssl/certs
              readOnly: true
            - name: usrsharecacerts
              mountPath: /usr/share/ca-certificates
              readOnly: true
      volumes:
        - name: ssl-certs
          hostPath:
            path: /etc/ssl/certs
        - name: usrsharecacerts
          hostPath:
            path: /usr/share/ca-certificates

Solution

  • That's a bug in the manifest. Support for the kubelet summary API was not added until a later version (starting at v0.20.0-alpha8). You can either change to a more recent heapster version (the default manifest uses v1.0.2), or you can revert to the old (cAdvisor API) source: --source=kubernetes:''