【发布时间】:2019-07-12 12:41:28
【问题描述】:
我已经在 Kubernetes 上部署了启用了安全性的 elasticsearch/kibana helm chart,测试表明一切正常,并且测试在 local 上使用 curl,
对于弹性搜索:
{
"cluster_name" : "security",
"status" : "green",
"timed_out" : false,
"number_of_nodes" : 3,
"number_of_data_nodes" : 3,
"active_primary_shards" : 3,
"active_shards" : 6,
"relocating_shards" : 0,
"initializing_shards" : 0,
"unassigned_shards" : 0,
"delayed_unassigned_shards" : 0,
"number_of_pending_tasks" : 0,
"number_of_in_flight_fetch" : 0,
"task_max_waiting_in_queue_millis" : 0,
"active_shards_percent_as_number" : 100.0
}
curl -I -k -u elastic:$密码https://localhost:5601/app/kibana
HTTP/1.1 200 OK
content-security-policy: script-src 'unsafe-eval' 'nonce-hVJdRFhEJHdFV5kW'; worker-src blob:; child-src blob:
kbn-name: kibana
kbn-xpack-sig: 0ebe654e32c040bd4b2aff05c3931890
cache-control: no-cache
content-type: text/html; charset=utf-8
content-length: 81348
vary: accept-encoding
connection: close
Date: Thu, 11 Jul 2019 11:23:38 GMT
但是当我转发部署以获取 UI 时,我收到此错误:
错误:
无法连接到端口 8080 上的 Cloud Shell。
确保您的服务器正在侦听端口 8080,然后重试。
此外,当我卷曲转发的链接时,它会显示 HTTP/2 302 错误。
我使用了两种方法,一种是使用谷歌云平台的UI来暴露服务UI used to expose the service, 另一种是使用shell进行端口转发:
&& echo "# When the next line says 'Forwarding from...', go to: https://ssh.cloud.google.com/devshell/proxy?port=8080" && kubectl port-forward $(kubectl get pod --selector="app=kibana,release=
helm-kibana-security" --output jsonpath='{.items[0].metadata.name}') 8080:5601--project test-dev \
Fetching cluster endpoint and auth data.orwarding from...', go to: https://ssh.cloud.google.com/devshell/proxy?port=8080" && kubectl port-forward $(kubectl getpod --selector="app=kibana,release=h
kubeconfig entry generated for test-backend.
# When the next line says 'Forwarding from...', go to: https://ssh.cloud.google.com/devshell/proxy?port=8080
Forwarding from 127.0.0.1:8080 -> 5601
有人可以帮帮我吗?
【问题讨论】:
-
“转发”是指作为服务公开?你的步骤是什么?
-
你用什么命令来转发你的端口?
-
我使用了 2 种方法,一种使用谷歌云平台的 UI,另一种使用 shell,(有关我编辑的问题的更多详细信息)
-
@M.Bou 根据您的屏幕截图,您在尝试连接端口 8080 时将部署暴露在端口 80 上
标签: kubernetes kibana