[英]Kompose doesn't bring up localhost for openzipkin and Elastic
I am new to K8s and I am trying to migrate my service (which currently utilizes docker-compose.yml) to k8s. 我是K8s的新手,我正在尝试将我的服务(目前使用docker-compose.yml)迁移到k8s。 My service
我的服务
deploys zipkin and elasticsearch
部署zipkin和elasticsearch
and these can be accessed at 'localhost:9411'
and 'localhost:9200'
respectively. 这些可以分别在
'localhost:9411'
和'localhost:9200'
。
The most commonly used solution I found online was 'kompose' and I tried to run, 我在网上找到的最常用的解决方案是'kompose',我试着跑,
kompose up
2. 2。
kompose convert
kubectl apply -f *****-deployment.yaml, ****-service.yaml
Once I finish this, I run kubectl get pods and I can see my deployments, but elasticsearch and zipkin are no more responsive on their respective localhost ports. 一旦我完成了这个,我运行kubectl get pods,我可以看到我的部署,但elasticsearch和zipkin对它们各自的localhost端口没有更多的响应。
Ouput of 'kubectl get pods'
'kubectl get pods'
输出
Output of 'docker ps'
'docker ps'
输出
Output of curl http://localhost:9200
输出
curl http://localhost:9200
Can someone tell me why this is happening and how to debug? 有人能告诉我为什么会这样,以及如何调试?
It is solved now; 它现在解决了; all I had to do was port forwarding.
我所要做的只是端口转发。
kubectl port-forward zipkin-774cc77659-g929n 9411:9411
Thanks, 谢谢,
By default you service is exposed as ClusterIP , in this case your service will be accessible from within your cluster. 默认情况下,您将服务公开为ClusterIP ,在这种情况下,您的服务可以从群集中访问。
You can use port forwarding " With this connection in place you can use your local workstation to debug your application that is running in the pod " as described in the answer above. 您可以使用端口转发“ 使用此连接,您可以使用本地工作站调试在Pod中运行的应用程序 ”,如上面的答案中所述。
Another approach is to use other "service types" like NodePort . 另一种方法是使用其他“服务类型”,如NodePort 。
You can find more information here Publishing services (ServiceTypes) 您可以在此处找到更多信息发布服务(ServiceTypes)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.