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

Tip:

  Watch the deployment status using the command: kubectl get pods -w --namespace {{ .Release.Namespace }}

Kubeapps can be accessed via port {{ .Values.frontend.service.port }} on the following DNS name from within your cluster:

   {{ template "kubeapps.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local

To access Kubeapps from outside your K8s cluster, follow the steps below:

{{- if .Values.ingress.enabled }}

1. Get the Kubeapps URL and associate Kubeapps hostname to your cluster external IP:

   export CLUSTER_IP=$(minikube ip) # On Minikube. Use: `kubectl cluster-info` on others K8s clusters
   {{- range .Values.ingress.hosts }}
   echo "Kubeapps URL: http{{ if .tls }}s{{ end }}://{{ .name }}{{ default "/" .path }}"
   echo "$CLUSTER_IP  {{ .name }}" | sudo tee -a /etc/hosts
   {{- end }}

{{- else }}

1. Get the Kubeapps URL by running these commands:

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

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

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

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

   export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "kubeapps.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
   echo "Kubeapps URL: http://$SERVICE_IP:{{ .Values.frontend.service.port }}"

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

   echo "Kubeapps URL: http://127.0.0.1:8080"
   export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "kubeapps.fullname" . }}" -o jsonpath="{.items[0].metadata.name}")
   kubectl port-forward --namespace {{ .Release.Namespace }} $POD_NAME 8080:8080

{{- end }}
{{- end }}

2. Open a browser and access Kubeapps using the obtained URL.
