Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/test/kubernetes/thinkphp/templates/NOTES.txt
Views: 11655
1. Get the application URL by running these commands:1{{- if .Values.ingress.enabled }}2{{- range $host := .Values.ingress.hosts }}3{{- range .paths }}4http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }}5{{- end }}6{{- end }}7{{- else if contains "NodePort" .Values.service.type }}8export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "thinkphp.fullname" . }})9export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")10echo http://$NODE_IP:$NODE_PORT11{{- else if contains "LoadBalancer" .Values.service.type }}12NOTE: It may take a few minutes for the LoadBalancer IP to be available.13You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "thinkphp.fullname" . }}'14export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "thinkphp.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")15echo http://$SERVICE_IP:{{ .Values.service.port }}16{{- else if contains "ClusterIP" .Values.service.type }}17export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "thinkphp.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")18export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")19echo "Visit http://127.0.0.1:{{ .Values.notes.hostPort }} to use your application"20kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME --address='{{.Values.notes.address}}' {{ .Values.notes.hostPort }}:$CONTAINER_PORT21{{- end }}222324