NOTES.txt 2.0 KB

1234567891011121314151617181920212223242526272829303132
  1. Meta service url for current release:
  2. {{- if contains "NodePort" .Values.configService.service.type }}
  3. export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "apollo.configService.fullName" . }})
  4. export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
  5. echo http://$NODE_IP:$NODE_PORT{{ .Values.configService.config.contextPath }}
  6. {{- else if contains "LoadBalancer" .Values.configService.service.type }}
  7. NOTE: It may take a few minutes for the LoadBalancer IP to be available.
  8. You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "apollo.configService.fullName" . }}'
  9. export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "apollo.configService.serviceName" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
  10. echo http://$SERVICE_IP:{{ .Values.service.port }}{{ .Values.configService.config.contextPath }}
  11. {{- else if contains "ClusterIP" .Values.configService.service.type }}
  12. echo {{ include "apollo.configService.serviceUrl" .}}
  13. For local test use:
  14. export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ include "apollo.configService.fullName" . }}" -o jsonpath="{.items[0].metadata.name}")
  15. echo http://127.0.0.1:8080{{ .Values.configService.config.contextPath }}
  16. kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:8080
  17. {{- end }}
  18. {{- if .Values.configService.ingress.enabled }}
  19. Ingress:
  20. {{- range $host := .Values.configService.ingress.hosts }}
  21. {{- range .paths }}
  22. http{{ if $.Values.configService.ingress.tls }}s{{ end }}://{{ $host.host }}{{ . }}
  23. {{- end }}
  24. {{- end }}
  25. {{- end }}
  26. Urls registered to meta service:
  27. Config service: {{ include "apollo.configService.serviceUrl" .}}
  28. Admin service: {{ include "apollo.adminService.serviceUrl" .}}