|
1 | 1 | 1. Get the application URL by running these commands: |
2 | | -{{- if .Values.ingress.enabled }} |
3 | | -{{- range $host := .Values.ingress.hosts }} |
4 | | - http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host }}/ |
5 | | -{{- end }} |
6 | | -{{- else if contains "NodePort" .Values.service.grpc.type }} |
| 2 | +{{- if contains "NodePort" .Values.service.wireguard.type }} |
7 | 3 | export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "defguard-gateway.fullname" . }}) |
8 | 4 | export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") |
9 | 5 | echo http://$NODE_IP:$NODE_PORT |
10 | | -{{- else if contains "LoadBalancer" .Values.service.grpc.type }} |
| 6 | +{{- else if contains "LoadBalancer" .Values.service.wireguard.type }} |
11 | 7 | NOTE: It may take a few minutes for the LoadBalancer IP to be available. |
12 | 8 | You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "defguard-gateway.fullname" . }}' |
13 | 9 | export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "defguard-gateway.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") |
14 | | - echo http://$SERVICE_IP:{{ .Values.service.grpc.port }} |
15 | | -{{- else if contains "ClusterIP" .Values.service.grpc.type }} |
| 10 | + echo http://$SERVICE_IP:{{ .Values.service.wireguard.port }} |
| 11 | +{{- else if contains "ClusterIP" .Values.service.wireguard.type }} |
16 | 12 | export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "defguard-gateway.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") |
17 | 13 | export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") |
18 | 14 | echo "Visit http://127.0.0.1:8080 to use your application" |
|
0 commit comments