Your data. Anywhere you go.

New Relic for iOS or Android


Download on the App Store    Android App on Google play


New Relic Insights App for iOS


Download on the App Store


Learn more

Close icon

No Namespaces and deployments, but kube-state-metrics service works


#1

I have deployed the kube-state-metrics and new relic infra k8s. I used both the Service IP or the Hostname (DNS) of the kube-state-metrics, and still my newrelic console is not showiing anything.

      - env:
        - name: NRIA_LICENSE_KEY
          valueFrom:
            secretKeyRef:
              key: license
              name: core-services-newrelic-infrastructure-config
        - name: CLUSTER_NAME
          value: cm-qlm-dev-eks
        - name: KUBE_STATE_METRICS_URL
          value: http://172.20.190.108:8080
        - name: NRIA_DISPLAY_NAME
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: spec.nodeName
        - name: NRK8S_NODE_NAME
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: spec.nodeName
        - name: NRIA_CUSTOM_ATTRIBUTES
          value: '{"clusterName":"$(CLUSTER_NAME)"}'
        - name: TIMEOUT
          value: "15000"
        - name: NRIA_PASSTHROUGH_ENVIRONMENT
          value: KUBERNETES_SERVICE_HOST,KUBERNETES_SERVICE_PORT,CLUSTER_NAME,CADVISOR_PORT,NRK8S_NODE_NAME,KUBE_STATE_METRICS_URL,TIMEOUT
        image: newrelic/infrastructure-k8s:1.6.0

my kube-state-metrics service:

core-services-kube-state-metrics ClusterIP 172.20.190.108 <none> 8080/TCP 1d


#2

Hi there!

This is a known issue with Kube State Metrics 1.5. Could you let me know which one you have? If you have 1.5, going down to 1.4 usually fixes this issue.

Hope this helps! Please let me know if you have any questions.

Regards,

Paul


#4

So dropping down to version 1.4 isn’t always an option. I am pointing at the kube-state-metrics deployed with the prometheus operator, so the version is somewhat pinned without some manual effort.

I noticed that namespace is available, but there isn’t a k8sNamespaceSample event set. You can pull namespace from the Pod or Container event set.

For example, the query on the k8s dashboard for namespaces is the following.

NRQL> FROM K8sNamespaceSample SELECT uniqueCount(namespace) FACET clusterName UNTIL 1 minute ago limit 100

If you change that to the following, it will return results.

NRQL> FROM K8sContainerSample SELECT uniqueCount(label.namespace) FACET clusterName UNTIL 1 minute ago limit 100

How can we modify the stock dashboard?


#5

I didn’t fix the issue, the issue is back to 0.
somethign changed?


#6

Hi @chris.byrd! Unfortunately, there’s no way to modify the stock-dashboard, but (as you likely know) you can create custom dashboards. Though, to be clear, the source for K8sContainerSample does not actually pull namespace data from kube-state-metrics, but is pulling a label. To receive actual namespace data, we will require versions prior to 1.5.

@v.aretakis - could you clarify? Are you also missing deployments and namespace data?