Skip to content

Commit

Permalink
📝 simplify the port forward command in NOTES
Browse files Browse the repository at this point in the history
  • Loading branch information
mshade committed Sep 7, 2023
1 parent 92b8b99 commit fdd5119
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions chart/kronic/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@ Thanks for using Kronic!
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "kronic.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
echo http://$SERVICE_IP:{{ .Values.service.port }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "kronic.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT
kubectl --namespace {{ .Release.Namespace }} port-forward deployment/{{ include "kronic.fullname" . }} 8000:8000
echo "Visit http://127.0.0.1:8000 to use Kronic"
{{- end }}

Submit issues or feedback at: https://github.com/mshade/kronic/issues

0 comments on commit fdd5119

Please sign in to comment.