1 1. Kong Admin can be accessed inside the cluster using:
2 DNS={{ template "kong.fullname" . }}-admin.{{ .Release.Namespace }}.svc.cluster.local
3 PORT={{ .Values.admin.servicePort }}
5 To connect from outside the K8s cluster:
6 {{- if contains "LoadBalancer" .Values.admin.type }}
7 HOST=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "kong.fullname" . }}-admin -o jsonpath='{.status.loadBalancer.ingress.ip}')
8 PORT=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "kong.fullname" . }}-admin -o jsonpath='{.spec.ports[0].nodePort}')
10 {{- else if contains "NodePort" .Values.admin.type }}
11 HOST=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath='{.items[0].status.addresses[0].address}')
12 PORT=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "kong.fullname" . }}-admin -o jsonpath='{.spec.ports[0].nodePort}')
14 {{- else if .Values.admin.ingress.enabled }}
16 use one of the addresses listed below
18 {{- $path := .Values.admin.ingress.path -}}
19 {{- if .Values.admin.ingress.tls }}
20 {{- range .Values.admin.ingress.hosts }}
21 https://{{ . }}{{ $path }}
24 {{- range .Values.admin.ingress.hosts }}
25 http://{{ . }}{{ $path }}
29 {{- else if contains "ClusterIP" .Values.admin.type }}
32 # Execute the following commands to route the connection to Admin SSL port:
33 export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "release={{ .Release.Name }}, app={{ template "kong.name" . }}" -o jsonpath="{.items[0].metadata.name}")
34 kubectl port-forward --namespace {{ .Release.Namespace }} $POD_NAME {{ .Values.admin.servicePort }}:{{ .Values.admin.servicePort }}
38 2. Kong Proxy can be accessed inside the cluster using:
39 DNS={{ template "kong.fullname" . }}-proxy.{{ .Release.Namespace }}.svc.cluster.local
40 {{- if .Values.proxy.tls.enabled -}}
41 PORT={{ .Values.proxy.tls.servicePort }}
43 PORT={{ .Values.proxy.http.servicePort }}
47 To connect from outside the K8s cluster:
48 {{- if contains "LoadBalancer" .Values.proxy.type }}
49 HOST=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "kong.fullname" . }}-proxy -o jsonpath='{.status.loadBalancer.ingress.ip}')
50 PORT=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "kong.fullname" . }}-proxy -o jsonpath='{.spec.ports[0].nodePort}')
52 {{- else if contains "NodePort" .Values.proxy.type }}
53 HOST=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath='{.items[0].status.addresses[0].address}')
54 PORT=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "kong.fullname" . }}-proxy -o jsonpath='{.spec.ports[0].nodePort}')
56 {{- else if .Values.proxy.ingress.enabled }}
58 use one of the addresses listed below
60 {{- $path := .Values.proxy.ingress.path -}}
61 {{- if .Values.proxy.ingress.tls }}
62 {{- range .Values.proxy.ingress.hosts }}
63 https://{{ . }}{{ $path }}
66 {{- range .Values.proxy.ingress.hosts }}
67 http://{{ . }}{{ $path }}
71 {{- else if contains "ClusterIP" .Values.proxy.type }}
74 # Execute the following commands to route the connection to proxy SSL port:
75 export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "release={{ .Release.Name }}, app={{ template "kong.name" . }}" -o jsonpath="{.items[0].metadata.name}")
76 {{- if .Values.proxy.tls.enabled -}}
77 kubectl port-forward --namespace {{ .Release.Namespace }} $POD_NAME {{ .Values.proxy.tls.servicePort }}:{{ .Values.proxy.tls.servicePort }}
79 kubectl port-forward --namespace {{ .Release.Namespace }} $POD_NAME {{ .Values.proxy.http.servicePort }}:{{ .Values.proxy.http.servicePort }}