kubernetes/minikube

Pod unable to reach itself through a service using driver none

Open

#13,370 建立於 2022年1月18日

在 GitHub 查看
 (19 留言) (1 反應) (0 負責人)Go (5,222 fork)batch import
co/none-driverhelp wantedkind/buglifecycle/frozenpriority/backlog

倉庫指標

Star
 (31,799 star)
PR 合併指標
 (平均合併 12天 19小時) (30 天內合併 43 個 PR)

描述

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

貢獻者指南