Misdirected Request error when using nonstandard ports
I'm trying to deploy Big Bang with a nonstandard port setup, since the cluster I'm in already uses ports 80 and 443. I'm coming from BB v1.14.1 which was working fine. Doing a full teardown and replace, not an upgrade-in-place. This is a demo environment.
I think I've narrowed the issue down to the misdirected-request
EnvoyFilter, here's a full writeup:
What I expect
I can deploy BB 1.17.0 using nonstandard ports 9080 and 9443 instead of 80 and 443
What I see
All services come up fine, but navigating to a service in my browser gives me a 421 "Misdirected Request"
Environment
- K3s cluster in a Vagrant VM running Ubuntu 20.04
- One IngressGateway called
public
- The
bigbang.dev
domain and certs - BB v1.17.0
Steps to reproduce
I'm using Zarf at the moment, putting together a demo deployment of Big Bang. Here's the branch I'm currently using (edit: that got merged, so the master branch is now using the new version. When doing demos I just delete the EnvoyFilter and it works fine)
- Clone Zarf and check out that branch
cd examples
-
make all-dev
(will build the binary and all packages, and stand up the Ubuntu VM) - (inside the VM)
sudo su
cd zarf-examples
./zarf init --confirm --features management,utility-cluster --host localhost
- Wait a bit for everything to come up. Use
k9s
to check ./zarf package deploy zarf-package-big-bang-core-demo.tar.zst --confirm
- Wait several minutes
- Navigate to a service like https://grafana.bigbang.dev:9443 -
❌ Misdirected Request - Delete this EnvoyFilter
- Navigate to a service like https://grafana.bigbang.dev:9443 -
✅ Works great, which leads me to believe the issue lies in this EnvoyFilter.
Without Zarf, I think the minimal steps to produce would be to just deploy BB 1.17.0 using a config that looks like this:
Note the most important part here is telling Istio to use ports 9080 and 9443 instead of 80 and 443
...
domain: bigbang.dev
# disable the network policies just to keep things simple and small
networkPolicies:
enabled: false
# disable gatekeeper just to keep things simple and small
gatekeeper:
enabled: false
istio:
enabled: true
ingressGateways:
public-ingressgateway:
type: "LoadBalancer"
kubernetesResourceSpec:
service:
ports:
- name: status-port
port: 15021
protocol: TCP
targetPort: 15021
- name: http2
port: 9080
protocol: TCP
targetPort: 8080
- name: https
port: 9443
protocol: TCP
targetPort: 8443
- name: tls
port: 15443
protocol: TCP
targetPort: 15443
gateways:
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VHQ8BAf8EBAMCAQYw
SwYIKwYBBQUHAQEEPzA9MDsGCCsGAQUFBzAChi9odHRwOi8vYXBwcy5pZGVudHJ1
c3QuY29tL3Jvb3RzL2RzdHJvb3RjYXgzLnA3YzAfBgNVHSMEGDAWgBTEp7Gkeyxx
+tvhS5B1/8QVYIWJEDBUBgNVHSAETTBLMAgGBmeBDAECATA/BgsrBgEEAYLfEwEB
ATAwMC4GCCsGAQUFBwIBFiJodHRwOi8vY3BzLnJvb3QteDEubGV0c2VuY3J5cHQu
b3JnMDwGA1UdHwQ1MDMwMaAvoC2GK2h0dHA6Ly9jcmwuaWRlbnRydXN0LmNvbS9E
U1RST09UQ0FYM0NSTC5jcmwwHQYDVR0OBBYEFHm0WeZ7tuXkAXOACIjIGlj26Ztu
MA0GCSqGSIb3DQEBCwUAA4IBAQAKcwBslm7/DlLQrt2M51oGrS+o44+/yQoDFVDC
5WxCu2+b9LRPwkSICHXM6webFGJueN7sJ7o5XPWioW5WlHAQU7G75K/QosMrAdSW
9MUgNTP52GE24HGNtLi1qoJFlcDyqSMo59ahy2cI2qBDLKobkx/J3vWraV0T9VuG
WCLKTVXkcGdtwlfFRjlBz4pYg1htmf5X6DYO8A4jqv2Il9DjXA6USbW1FzXSLr9O
he8Y4IWS6wY7bCkjCWDcRQJMEhg76fsO3txE+FiYruq9RUWhiF1myv4Q6W+CyBFC
Dfvp7OOGAN6dEOM4+qR9sdjoSYKEBpsr6GtPAQw4dy753ec5
-----END CERTIFICATE-----
...
Visual Proof (screenshots, videos, text)
Severity/Priority
Medium? This isn't the critical path since it's about running nonstandard ports, but still something that will block me from fully upgrading in my demo environment, which will block my work to document compliance with STIG and NSA/CISA hardening guidance