|
| 1 | +1. Get the application URL by running these commands: |
| 2 | +{{- if contains "NodePort" .Values.api.service.type }} |
| 3 | + export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "aconext.api.name" . }}) |
| 4 | + export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") |
| 5 | + echo "API URL: http://$NODE_IP:$NODE_PORT" |
| 6 | +{{- else if contains "LoadBalancer" .Values.api.service.type }} |
| 7 | + NOTE: It may take a few minutes for the LoadBalancer IP to be available. |
| 8 | + You can watch its status by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "aconext.api.name" . }}' |
| 9 | + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "aconext.api.name" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") |
| 10 | + echo "API URL: http://$SERVICE_IP:{{ .Values.api.service.port }}" |
| 11 | +{{- else if contains "ClusterIP" .Values.api.service.type }} |
| 12 | + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "aconext.name" . }}-api,app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") |
| 13 | + export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") |
| 14 | + echo "Visit http://127.0.0.1:8080 to use your application" |
| 15 | + kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT |
| 16 | +{{- end }} |
| 17 | + |
| 18 | +2. Check service status: |
| 19 | + kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/instance={{ .Release.Name }}" |
| 20 | + kubectl get svc --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/instance={{ .Release.Name }}" |
| 21 | + |
| 22 | +3. View logs: |
| 23 | + kubectl logs --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "aconext.name" . }}-api" --tail=100 |
| 24 | + kubectl logs --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "aconext.name" . }}-core" --tail=100 |
| 25 | + |
| 26 | +4. Service endpoints: |
| 27 | +{{- if .Values.core.enabled }} |
| 28 | + Core Service: {{ include "aconext.core.name" . }}:{{ .Values.core.service.port }} |
| 29 | +{{- end }} |
| 30 | +{{- if .Values.api.enabled }} |
| 31 | + API Service: {{ include "aconext.api.name" . }}:{{ .Values.api.service.port }} |
| 32 | +{{- end }} |
| 33 | + |
| 34 | +5. Dependencies status: |
| 35 | +{{- if .Values.postgresql.enabled }} |
| 36 | + PostgreSQL: Enabled (internal) |
| 37 | +{{- else }} |
| 38 | + PostgreSQL: External ({{ .Values.external.postgresql.host }}:{{ .Values.external.postgresql.port }}) |
| 39 | +{{- end }} |
| 40 | +{{- if .Values.redis.enabled }} |
| 41 | + Redis: Enabled (internal) |
| 42 | +{{- else }} |
| 43 | + Redis: External ({{ .Values.external.redis.host }}:{{ .Values.external.redis.port }}) |
| 44 | +{{- end }} |
| 45 | +{{- if .Values.rabbitmq.enabled }} |
| 46 | + RabbitMQ: Enabled (internal) |
| 47 | +{{- else }} |
| 48 | + RabbitMQ: External ({{ .Values.external.rabbitmq.host }}:{{ .Values.external.rabbitmq.port }}) |
| 49 | +{{- end }} |
| 50 | + |
| 51 | +{{- if and .Values.httpRoute.enabled .Values.httpRoute.gateway.name }} |
| 52 | +{{- if .Values.httpRoute.hostnames }} |
| 53 | +6. API Health Check: |
| 54 | +{{- range .Values.httpRoute.hostnames }} |
| 55 | + Health Check: http://{{ . }}/health |
| 56 | +{{- end }} |
| 57 | +{{- else }} |
| 58 | +6. API Health Check: |
| 59 | + Health Check: http://<GATEWAY_IP>/health |
| 60 | + (Note: Configure httpRoute.hostnames to get the full URL) |
| 61 | +{{- end }} |
| 62 | +{{- end }} |
0 commit comments