** Please be patient while the chart is being deployed **

Watch the kube-state-metrics Deployment status using the command:

    kubectl get deploy -w --namespace {{ .Release.Namespace }} -l app.kubernetes.io/name={{ template "kube-state-metrics.name" . }},app.kubernetes.io/instance={{ .Release.Name }}

kube-state-metrics can be accessed via port "{{ .Values.service.port }}" on the following DNS name from within your cluster:

    {{ template "kube-state-metrics.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local

To access kube-state-metrics from outside the cluster execute the following commands:

{{- if contains "LoadBalancer" .Values.service.type }}

    NOTE: It may take a few minutes for the LoadBalancer IP to be available.
    Watch the status with: 'kubectl get svc --namespace {{ .Release.Namespace }} -w {{ template "kube-state-metrics.fullname" . }}'

{{- $port:=.Values.service.port | toString }}

    export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "kube-state-metrics.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
    echo "URL: http://$SERVICE_IP{{- if ne $port "80" }}:{{ .Values.service.port }}{{ end }}/"

{{- else if contains "ClusterIP"  .Values.service.type }}

    echo "URL: http://127.0.0.1:9100/"
    kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ template "kube-state-metrics.fullname" . }} 9100:{{ .Values.service.port }}

{{- else if contains "NodePort" .Values.service.type }}

    export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "kube-state-metrics.fullname" . }})
    export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
    echo "URL: http://$NODE_IP:$NODE_PORT/"

{{- end }}

{{- include "kube-state-metrics.validateValues" . }}
{{- include "kube-state-metrics.checkRollingTags" . }}
