kubernetes/minikube

Pod unable to reach itself through a service using driver none

Open

#13.370 aperta il 18 gen 2022

Vedi su GitHub
 (19 commenti) (1 reazione) (0 assegnatari)Go (5222 fork)batch import
co/none-driverhelp wantedkind/buglifecycle/frozenpriority/backlog

Metriche repository

Star
 (31.799 star)
Metriche merge PR
 (Merge medio 12g 19h) (43 PR mergiate in 30 g)

Descrizione

What Happened?

If a pod has a service which points to the pod, the pod cannot reach itself through the service IP. Other pods can reach the service and the pod itself can reach other services. Similar to #1568

But i'm using driver none, and the different proposal in the issue hasn't help.

Just a simple service : apiVersion: v1 kind: Pod metadata: name: replyer namespace: sample-domain1-ns spec: containers:

  • name: replyer image: nginx-echo-headers:v1 imagePullPolicy: IfNotPresent restartPolicy: Always

apiVersion: v1 kind: Service metadata: namespace: sample-domain1-ns name: replyer-ext spec: selector: k8s-app: replyer ports:

  • name: app port: 8080 protocol: TCP targetPort: 8080

nginx-echo-headers is a sample nginx that print back request (https://github.com/brndnmtthws/nginx-echo-headers), and i added curl to the image.

From the running pod if i run curl:

/ # curl -v replyer-ext:8080

  • Rebuilt URL to: replyer-ext:8080/
  • Trying 10.98.117.249...
  • TCP_NODELAY set
  • connect to 10.98.117.249 port 8080 failed: Operation timed out
  • Failed to connect to replyer-ext port 8080: Operation timed out
  • Closing connection 0 curl: (7) Failed to connect to replyer-ext port 8080: Operation timed out

Attach the log file

I added the logs, i have other pods running, hopefully the logs are clear log2.txt

Operating System

Ubuntu

Driver

None

Guida contributor