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

Ingress not working outside of host on cluster upgrade #7586

Closed
kinarashah opened this issue May 20, 2023 · 5 comments
Closed

Ingress not working outside of host on cluster upgrade #7586

kinarashah opened this issue May 20, 2023 · 5 comments
Assignees
Labels
kind/bug Something isn't working priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Milestone

Comments

@kinarashah
Copy link

Environmental Info:
K3s Version: Upgraded from v1.25.9+k3s1 to v1.26.4+k3s1

k3s version v1.26.4+k3s1 (8d0255af)
go version go1.19.8

Node(s) CPU architecture, OS, and Version:

Linux ip-172-31-7-19 5.19.0-1025-aws #26~22.04.1-Ubuntu SMP Mon Apr 24 01:58:15 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Cluster Configuration: 1 node

Describe the bug:

Steps To Reproduce:

config.yaml

write-kubeconfig-mode: 644
cluster-init: true
node-external-ip: xx.xxx.xx.xxx 

Steps:

  1. Install k3s: curl -sfL https://get.k3s.io/ | INSTALL_K3S_VERSION=v1.25.9+k3s1 sh -
  2. Deploy ingress: kubectl apply -f ing.yaml (Attached ing.yaml below)
  3. query ingress FROM OUTSIDE OF THE VM: curl -H 'Host: [test2.com](http://test2.com/)' http://xx.xxx.xx.xxx/name.html . Expected result like ingresstest-deploy-abcde
  4. Upgrade k3s: curl -sfL https://get.k3s.io/ | INSTALL_K3S_VERSION=v1.26.4+k3s1 sh -
  5. Repeat step 3. Expect same result, but actually get Failed to connect: port 80 after 46 ms: Couldn't connect to server

Expected behavior:
curl ingress should continue to work outside of host after upgrade

Actual behavior:
curl fails with Failed to connect xx.xx.xx.xx port 80 after 46 ms: Couldn't connect to server

Additional context / logs:
logs.zip

@rancher-max
Copy link
Contributor

Couple of additional notes:

  1. This appears to happen on all upgrades. I confirmed it happens on upgrade from v1.26.4 to v1.27.1, from v1.27.1 to v1.27.2-rc1, from v1.25.6 to v1.25.7, and from v1.24.8 to v1.24.9+k3s2.
  2. This does NOT happen on upgrade from v1.24.7 to v1.24.8, so I believe this broke sometime in the January 2023 release timeframe.
  3. The workaround is to restart the svclb-traefik pod
  4. Setting disable-network-policy does not fix this
  5. Setting different values for egress-selector-mode does not fix this
  6. This seems to only happen when node-external-ip is set

@brandond
Copy link
Contributor

I'm curious if reverting #7210 fixes this.

@rbrtbnfgl
Copy link
Contributor

rbrtbnfgl commented May 22, 2023

Could it be related to #7561
On that issue the ingress controller is not traefik but it could be somehow related.

@brandond
Copy link
Contributor

brandond commented May 22, 2023

Unlike rules managed by the kubelet/kube-router/flannel, CNI plugin rules are only created when the pod starts. If we remove them in the install script, networking to existing pods (such portmap rules for nodePort pods) will be broken until the pods are deleted and recreated. We should not clean CNI rules in the install script.

Root cause on this is the install script change in #7274

@brandond brandond added this to the v1.26.5+k3s1 milestone May 22, 2023
@brandond brandond added kind/bug Something isn't working priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. labels May 22, 2023
@brandond brandond modified the milestones: v1.26.5+k3s1, v1.27.2+k3s1 May 22, 2023
@rancher-max
Copy link
Contributor

This is working following the same steps and upgrading to the same versions. This is also working with system-upgrade-controller upgrades (as a regression test).

@kinarashah kinarashah changed the title Ingress not working outside of host on cluster upgraded from v1.25.9+k3s1 to v1.26.4+k3s1 Ingress not working outside of host on cluster upgrade Jun 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
Archived in project
Development

No branches or pull requests

4 participants