简体   繁体   English

在K8S上部署Kibana 6.8.2(使用安全性xpack功能)

[英]Kibana 6.8.2 deploying on K8S ( using security xpack feature )

Not so long ago I decided to deploy my Logstash and Kibana services on Kubernetes , but then I've been caught by a little problem . 不久前我决定在Kubernetes上部署Logstash和Kibana服务,但是后来我遇到了一个小问题。

Problem : I want to use 2 pods ( to provide load balancing ) of Kibana with the security feature , but when I try to log in it redirects me to a "Log In" page without any "errors". 问题:我想使用具有安全功能的Kibana的2个Pod(以提供负载平衡),但是当我尝试登录时,会将我重定向到“登录”页面,而没有任何“错误”。

I'm using images of Logstash 6.8.2 , Kibana 6.8.2 and Elastic cluster is distributed on VMs , all the stack worked perfect , but then I decided to add xpack security feature and found out that I can't use 2 pods of Kibana in the same Deployment at the same moment . 我正在使用Logstash 6.8.2,Kibana 6.8.2和Elastic cluster分布在VM上的映像,所有堆栈都运行良好,但是后来我决定添加xpack安全功能,发现无法使用2个Pod Kibana在同一时刻同时部署。 After that I tried to use only 1 pod and it works as it supposed to work , I also checked presence of conflicts between VM + container ... there is no problem , tried to add configuration of session affinity in ClusterIP service and it didn't help . 之后,我尝试仅使用1个Pod并按预期工作,然后我还检查了VM +容器之间是否存在冲突...没有问题,尝试在ClusterIP服务中添加会话亲缘关系的配置,但是没有无济于事。 I guess that the problem is in my K8S configuration and I'm close to success , but it's not enough . 我猜问题出在我的K8S配置中,我已经接近成功,但这还不够。

Thank you for all the support ! 谢谢大家的支持! I hope I'm not at the dead end and I'll be able to solve my problem with your help :heart: 我希望我不会走到尽头,在您的帮助下我将能够解决我的问题:heart:

PS: If there is no solution I'm glad to get feedback about your best practice of working with ELK on K8S . PS:如果没有解决方案,我很高兴收到有关您在K8S上使用ELK的最佳实践的反馈。

My logs in pods of Kibana are : 我在Kibana的吊舱中的日志是:

{"type":"response","@timestamp":"2019-08-28T12:01:57Z","tags":[],"pid":1,"method":"get","statusCode":200,"req":{"url":"/login?next=%2Fstatus","method":"get","headers":{"host":"< my pod IP >:5601","user-agent":"kube-probe/1.13","referer":"http://< my pod IP >:5601/status","accept-encoding":"gzip","connection":"close"},"remoteAddress":"< my remote address >","userAgent":"< my remote agent ( same as address ) >","referer":"http://< my pod IP >:5601/status"},"res":{"statusCode":200,"responseTime":9,"contentLength":9},"message":"GET /login?next=%2Fstatus 200 9ms - 9.0B"} {“ type”:“响应”,“ @ timestamp”:“ 2019-08-28T12:01:57Z”,“ tags”:[],“ pid”:1,“ method”:“ get”,“ statusCode” :200,“ req”:{“ url”:“ / login?next =%2Fstatus”,“ method”:“ get”,“ headers”:{“ host”:“ < 我的pod IP >:5601”,“ user-agent”:“ kube-probe / 1.13”,“ referer”:“ http:// < 我的pod IP >:5601 / status”,“ accept-encoding”:“ gzip”,“ connection”:“ close” },“ remoteAddress”:“ < 我的远程地址 >”,“ userAgent”:“ < 我的远程代理(与address相同) >”,“ referer”:“ http:// < 我的pod IP >:5601 / status” },“ res”:{“ statusCode”:200,“ responseTime”:9,“ contentLength”:9},“ message”:“ GET / login?next =%2Fstatus 200 9ms-9.0B”}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM