Check for kube-state-metrics in your cluster
kubectl get pods --all-namespaces | grep kube-state-metrics

If you see a response, that means kube-state-metrics is installed, and you can move on to step 2.

Otherwise, deploy kube-state-metrics to your cluster.

git clone \
  && kubectl --namespace=kube-system apply -f kube-state-metrics/examples/standard
Store your credentials

Save your shipping credentials as a Kubernetes secret.

Replace <<SHIPPING-TOKEN>> with the token of the account you want to ship to.

Replace <<LISTENER-HOST>> with your region’s listener host (for example, For more information on finding your account’s region, see Account region.

kubectl --namespace=kube-system create secret generic logzio-metrics-secret \
  --from-literal=logzio-metrics-shipping-token=<<SHIPPING-TOKEN>> \
Store your cluster details

Paste the kube-state-metrics namespace and port in your text editor. You can find them by running this command.

kubectl get service --all-namespaces | grep -E 'kube-state-metrics|NAMESPACE'

Paste the cluster name in your text editor. You can find it by running this command, or if you manage Kubernetes in AWS or Azure, you can find it in your admin console.

kubectl cluster-info

Now replace <<KUBE-STATE-METRICS-NAMESPACE>>, <<KUBE-STATE-METRICS-PORT>>, and <<CLUSTER-NAME>> in this command to save your cluster details as a Kubernetes secret.

kubectl --namespace=kube-system create secret generic cluster-details \
  --from-literal=kube-state-metrics-namespace=<<KUBE-STATE-METRICS-NAMESPACE>> \
  --from-literal=kube-state-metrics-port=<<KUBE-STATE-METRICS-PORT>> \
kubectl --namespace=kube-system create -f
Check for your metrics

Give your metrics some time to get from your system to ours, and then open