简体   繁体   中英

service curl in kubernetes

I have a pod and a service, both are working. when I look at the server logs, I can broadcast on the port, but I can't access it when I curl it, i'm getting a connection failed error how can I solve it

apiVersion: v1 kind: Service metadata: name: app labels: name: app-pod app: first-app spec: type: ClusterIP ports:

  • port: 80 targetPort: 5001 selector: name: app-pod app: first-app

i have a service like this, I'm using minikube, when I do kubectl logs {pod-svc} from minikube, it broadcasts on port 5001, but when I do curl in cluster again, I get a connection error to the ip address of the service

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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