Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows Node on Kubernetes v1.26.0 can't use NodePort to access service #279

Closed
dnsdhcp opened this issue Jan 19, 2023 · 4 comments
Closed
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@dnsdhcp
Copy link

dnsdhcp commented Jan 19, 2023

Kubernetes (please complete the following information):

  • Kubernetes Version: v1.26.0
  • CNI: calico v3.24.5
  • Control Plane x 1 ( RHEL 8.7 )
  • Windows Worker Node x 2 ( Windows Server version: 1809 OS Build 17763.3770 )

Describe the bug

I was creating pod and service using the following YAML.

apiVersion: v1
kind: Pod
metadata:
  name: "myiis"
  namespace: default
  labels:
    app: "myiis"
spec:
  containers:
  - name: myiis
    image: "mcr.microsoft.com/windows/servercore/iis:windowsservercore-ltsc2019"
    ports:
    - containerPort: 80
      name: http
  nodeSelector:
    kubernetes.io/os: windows
  restartPolicy: Always
---
apiVersion: v1
kind: Service
metadata:
  name: myiis
spec:
  ports:
    - port: 80
      targetPort: 80
  selector:
    app: myiis
  type: NodePort

I can only access myiis service on the node that running the pod.

[user@control ~]$  kubectl get node
NAME         STATUS     ROLES           AGE    VERSION
control      Ready      control-plane   7d3h   v1.26.0
winnode2     Ready      <none>          121m   v1.26.0
winsrv2019   Ready      <none>          7d3h   v1.26.0
[user@control ~]$ kubectl  get pods -o wide
NAME    READY   STATUS    RESTARTS   AGE   IP               NODE       NOMINATED NODE   READINESS GATES
myiis   1/1     Running   0          21s   192.168.74.131   winnode2   <none>           <none>
[user@control ~]$  kubectl get svc
NAME         TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)        AGE
kubernetes   ClusterIP   10.96.0.1       <none>        443/TCP        7d3h
myiis        NodePort    10.105.1.231    <none>        80:31884/TCP   113s

I can access to the service using the specific node IP address and it's NodePort.

[user@control ~]$ curl http://winnode2:31884 -I
HTTP/1.1 200 OK

But I can't access to the other nodes either Windows node nor Linux Node with the NodePort.

[user@control ~]$ curl http://winsrv2019:31884 -I
curl: (7) Failed to connect to winsrv2019 port 31884: Connection timed out

Expected behavior

The service should be accessible through every Node in the Kubernetes cluster.

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 19, 2023
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle rotten
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels May 19, 2023
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

@k8s-ci-robot
Copy link
Contributor

@k8s-triage-robot: Closing this issue, marking it as "Not Planned".

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

3 participants