diff --git a/cluster/addons/fluentd-elasticsearch/kibana-controller.yaml b/cluster/addons/fluentd-elasticsearch/kibana-controller.yaml index bd8c430d872..2c5748d1436 100644 --- a/cluster/addons/fluentd-elasticsearch/kibana-controller.yaml +++ b/cluster/addons/fluentd-elasticsearch/kibana-controller.yaml @@ -31,6 +31,8 @@ spec: env: - name: "ELASTICSEARCH_URL" value: "http://elasticsearch-logging:9200" + - name: "KIBANA_BASE_URL" + value: "/api/v1/proxy/namespaces/kube-system/services/kibana-logging" ports: - containerPort: 5601 name: ui diff --git a/cluster/addons/fluentd-elasticsearch/kibana-image/Makefile b/cluster/addons/fluentd-elasticsearch/kibana-image/Makefile index 7a18c4bff53..87a77796e05 100755 --- a/cluster/addons/fluentd-elasticsearch/kibana-image/Makefile +++ b/cluster/addons/fluentd-elasticsearch/kibana-image/Makefile @@ -15,9 +15,10 @@ .PHONY: build push TAG = v4.6.1 +PREFIX = gcr.io/google_containers build: - docker build -t gcr.io/google_containers/kibana:$(TAG) . + docker build -t $(PREFIX)/kibana:$(TAG) . push: - gcloud docker -- push gcr.io/google_containers/kibana:$(TAG) + gcloud docker -- push $(PREFIX)/kibana:$(TAG) diff --git a/cluster/addons/fluentd-elasticsearch/kibana-image/run.sh b/cluster/addons/fluentd-elasticsearch/kibana-image/run.sh index 0d52deecc4a..b536ef69c55 100755 --- a/cluster/addons/fluentd-elasticsearch/kibana-image/run.sh +++ b/cluster/addons/fluentd-elasticsearch/kibana-image/run.sh @@ -17,4 +17,8 @@ export ELASTICSEARCH_URL=${ELASTICSEARCH_URL:-"http://localhost:9200"} echo ELASTICSEARCH_URL=${ELASTICSEARCH_URL} +export KIBANA_BASE_URL=${KIBANA_BASE_URL:-""} +echo "server.basePath: ${KIBANA_BASE_URL}" +echo "server.basePath: ${KIBANA_BASE_URL}" >> /kibana/config/kibana.yml + /kibana/bin/kibana -e ${ELASTICSEARCH_URL}