|
2 | 2 | ⚠️ WARNING: You are using the embedded PostgreSQL database. |
3 | 3 | ⚠️ This is NOT recommended for production use! |
4 | 4 | ⚠️ For production deployments, please use an external PostgreSQL instance. |
5 | | - |
6 | | -PostgreSQL Database Information: |
7 | | -- Host: {{ include "marmot.fullname" . }}-postgresql |
8 | | -- Port: 5432 |
9 | | -- Database: {{ .Values.postgresql.auth.database }} |
10 | | -- Username: {{ .Values.postgresql.auth.username }} |
11 | | - |
12 | | -To get the PostgreSQL password, run: |
13 | | - export POSTGRES_PASSWORD=$(kubectl get secret --namespace {{ .Release.Namespace }} {{ include "marmot.fullname" . }}-postgresql -o jsonpath="{.data.postgres-password}" | base64 -d) |
14 | | - |
15 | | -{{- end }} |
16 | | - |
17 | | -1. Get the application URL by running these commands: |
18 | | -{{- if .Values.ingress.enabled }} |
19 | | -{{- range $host := .Values.ingress.hosts }} |
20 | | - {{- range .paths }} |
21 | | - http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }} |
22 | | - {{- end }} |
23 | | -{{- end }} |
24 | | -{{- else if contains "NodePort" .Values.service.type }} |
25 | | - export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "marmot.fullname" . }}) |
26 | | - export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") |
27 | | - echo http://$NODE_IP:$NODE_PORT |
28 | | -{{- else if contains "LoadBalancer" .Values.service.type }} |
29 | | - NOTE: It may take a few minutes for the LoadBalancer IP to be available. |
30 | | - You can watch its status by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "marmot.fullname" . }}' |
31 | | - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "marmot.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") |
32 | | - echo http://$SERVICE_IP:{{ .Values.service.port }} |
33 | | -{{- else if contains "ClusterIP" .Values.service.type }} |
34 | | - export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "marmot.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") |
35 | | - export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") |
36 | | - echo "Visit http://127.0.0.1:8080 to use your application" |
37 | | - kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT |
38 | 5 | {{- end }} |
0 commit comments