blob: 263b1d8d49dd78571ed8605ff7a8f7b87d828aa7 [file] [log] [blame]
Mohammed Naser9ad0d462023-01-15 20:36:37 -050011. Get the application URL by running these commands:
2{{- if .Values.ingress.enabled }}
3{{- range .Values.ingress.hosts }}
4 http{{ if $.Values.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }}
5{{- end }}
6{{- else if contains "NodePort" .Values.service.type }}
Mohammed Naser65cda132024-05-02 14:34:08 -04007 export NODE_PORT=$(kubectl get --namespace {{ template "prometheus-pushgateway.namespace" . }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "prometheus-pushgateway.fullname" . }})
8 export NODE_IP=$(kubectl get nodes --namespace {{ template "prometheus-pushgateway.namespace" . }} -o jsonpath="{.items[0].status.addresses[0].address}")
Mohammed Naser9ad0d462023-01-15 20:36:37 -05009 echo http://$NODE_IP:$NODE_PORT
10{{- else if contains "LoadBalancer" .Values.service.type }}
11 NOTE: It may take a few minutes for the LoadBalancer IP to be available.
12 You can watch the status of by running 'kubectl get svc -w {{ template "prometheus-pushgateway.fullname" . }}'
Mohammed Naser65cda132024-05-02 14:34:08 -040013 export SERVICE_IP=$(kubectl get svc --namespace {{ template "prometheus-pushgateway.namespace" . }} {{ template "prometheus-pushgateway.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
Mohammed Naser9ad0d462023-01-15 20:36:37 -050014 echo http://$SERVICE_IP:{{ .Values.service.port }}
15{{- else if contains "ClusterIP" .Values.service.type }}
Mohammed Naser65cda132024-05-02 14:34:08 -040016 export POD_NAME=$(kubectl get pods --namespace {{ template "prometheus-pushgateway.namespace" . }} -l "app.kubernetes.io/name={{ template "prometheus-pushgateway.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
17 kubectl port-forward $POD_NAME 9091
18 echo "Visit http://127.0.0.1:9091 to use your application"
19{{- end }}