[stable/mediawiki] Improve notes to access deployed services (#7015)

* Improve notes to access deployed services

* Add namespace to port-forward command
This commit is contained in:
Juan Ariza Toledano
2018-08-07 05:31:47 -07:00
committed by k8s-ci-robot
parent 61c032df1c
commit cab75bd2dc
2 changed files with 7 additions and 6 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
name: mediawiki
version: 3.0.5
version: 3.0.6
appVersion: 1.31.0
description: Extremely powerful, scalable software and a feature-rich wiki implementation
that uses PHP to process and display data stored in a database.
+6 -5
View File
@@ -19,7 +19,7 @@
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "mediawiki.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT/
echo "Mediawiki URL: http://$NODE_IP:$NODE_PORT/"
{{- else if contains "LoadBalancer" .Values.service.type }}
@@ -27,12 +27,13 @@
Watch the status with: 'kubectl get svc --namespace {{ .Release.Namespace }} -w {{ template "mediawiki.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "mediawiki.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo http://$SERVICE_IP/
echo "Mediawiki URL: http://$SERVICE_IP/"
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "mediawiki.fullname" . }}" -o jsonpath="{.items[0].metadata.name}")
echo http://127.0.0.1:8080/
kubectl port-forward $POD_NAME 8080:80
echo "Mediawiki URL: http://127.0.0.1:8080/"
kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ template "mediawiki.fullname" . }} 8080:80
{{- end }}
{{- end }}