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

Port validation breaks options that used to work on Linux #12919

Closed
mans0954 opened this issue Nov 10, 2021 · 2 comments · Fixed by #13015
Closed

Port validation breaks options that used to work on Linux #12919

mans0954 opened this issue Nov 10, 2021 · 2 comments · Fixed by #13015
Assignees
Labels
kind/regression Categorizes issue or PR as related to a regression from a prior release. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Milestone

Comments

@mans0954
Copy link

Prior to minikube 1.24.0, it used to be possible to create the minikube container so that ports were exposed on 127.0.0.1:443 and 127.0.0.1:80 e.g.

# Install minikube 1.23.2
sudo dpkg -i minikube_1.23.2-0_amd64.deb

# Start minikube, exposing port `443` on `127.0.0.1:443` and port `80` `127.0.0.1:80`
minikube start  --ports=127.0.0.1:443:443 --ports=127.0.0.1:80:80 --profile minikube-1-23-2

# Inspect the container
docker inspect minikube-1-23-2 | jq .[0].NetworkSettings.Ports
{
  "22/tcp": [
    {
      "HostIp": "127.0.0.1",
      "HostPort": "49172"
    }
  ],
  "2376/tcp": [
    {
      "HostIp": "127.0.0.1",
      "HostPort": "49171"
    }
  ],
  "32443/tcp": [
    {
      "HostIp": "127.0.0.1",
      "HostPort": "49168"
    }
  ],
  "443/tcp": [
    {
      "HostIp": "127.0.0.1",
      "HostPort": "443"
    }
  ],
  "5000/tcp": [
    {
      "HostIp": "127.0.0.1",
      "HostPort": "49170"
    }
  ],
  "80/tcp": [
    {
      "HostIp": "127.0.0.1",
      "HostPort": "80"
    }
  ],
  "8443/tcp": [
    {
      "HostIp": "127.0.0.1",
      "HostPort": "49169"
    }
  ]
}

# Enable the ingress addon
minikube addons enable ingress --profile minikube-1-23-2

# Check that nginx ingress responds to HTTP requests on `127.0.0.1:80`
curl --head http://127.0.0.1
HTTP/1.1 404 Not Found
Date: Wed, 10 Nov 2021 13:47:07 GMT
Content-Type: text/html
Content-Length: 146
Connection: keep-alive

# Check that  nginx ingress responds to HTTPS requests on `127.0.0.1:443`
curl --head -k https://127.0.0.1
HTTP/2 404 
date: Wed, 10 Nov 2021 13:47:20 GMT
content-type: text/html
content-length: 146

# Check that ports are exposed only on 127.0.0.1
curl http://127.0.0.2
curl: (7) Failed to connect to 127.0.0.2 port 80: Connection refused

curl -k https://127.0.0.2
curl: (7) Failed to connect to 127.0.0.2 port 443: Connection refused

# clean up
minikube delete --profile minikube-1-23-2

This behaviour seems to have been lost in minikube 1.24.0:

# Upgrade to minikube 1.24.0
sudo dpkg -i minikube_1.24.0-0_amd64.deb 

# Try to create a minikube container as before, exposing port `443` on `127.0.0.1:443` and port `80` `127.0.0.1:80`
minikube start  --ports=127.0.0.1:443:443 --ports=127.0.0.1:80:80 --profile minikube-1-24-0 --alsologtostderr
I1110 13:54:54.810788  136584 out.go:297] Setting OutFile to fd 1 ...
I1110 13:54:54.811016  136584 out.go:349] isatty.IsTerminal(1) = true
I1110 13:54:54.811028  136584 out.go:310] Setting ErrFile to fd 2...
I1110 13:54:54.811036  136584 out.go:349] isatty.IsTerminal(2) = true
I1110 13:54:54.811141  136584 root.go:313] Updating PATH: /home/mans0954/.minikube/bin
I1110 13:54:54.811542  136584 out.go:304] Setting JSON to false
I1110 13:54:54.833091  136584 start.go:112] hostinfo: {"hostname":"csh-Precision-5520","uptime":64944,"bootTime":1636487551,"procs":624,"os":"linux","platform":"ubuntu","platformFamily":"debian","platformVersion":"20.04","kernelVersion":"5.4.0-90-generic","kernelArch":"x86_64","virtualizationSystem":"kvm","virtualizationRole":"host","hostId":"64767abe-73ce-4bf8-b1b0-0d468395d171"}
I1110 13:54:54.833225  136584 start.go:122] virtualization: kvm host
I1110 13:54:54.838311  136584 out.go:176] 😄  [minikube-1-24-0] minikube v1.24.0 on Ubuntu 20.04
😄  [minikube-1-24-0] minikube v1.24.0 on Ubuntu 20.04
I1110 13:54:54.838485  136584 notify.go:174] Checking for updates...
I1110 13:54:54.838961  136584 config.go:176] Loaded profile config "minikube": Driver=docker, ContainerRuntime=docker, KubernetesVersion=v1.22.2
I1110 13:54:54.839049  136584 driver.go:343] Setting default libvirt URI to qemu:///system
I1110 13:54:54.839075  136584 global.go:111] Querying for installed drivers using PATH=/home/mans0954/.minikube/bin:/home/mans0954/.elan/bin:/home/mans0954/.local/bin:/usr/local/go/bin:/home/mans0954/.elan/bin:/home/mans0954/bin:/usr/share/rvm/gems/ruby-2.7.1/bin:/usr/share/rvm/gems/ruby-2.7.1@global/bin:/usr/share/rvm/rubies/ruby-2.7.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/share/rvm/bin:/home/mans0954/go/bin
I1110 13:54:54.885553  136584 global.go:119] kvm2 default: true priority: 8, state: {Installed:true Healthy:true Running:true NeedsImprovement:false Error:<nil> Reason: Fix: Doc:}
I1110 13:54:54.954569  136584 global.go:119] none default: false priority: 4, state: {Installed:true Healthy:true Running:false NeedsImprovement:false Error:<nil> Reason: Fix: Doc:}
I1110 13:54:54.954795  136584 global.go:119] podman default: true priority: 7, state: {Installed:false Healthy:false Running:false NeedsImprovement:false Error:exec: "podman": executable file not found in $PATH Reason: Fix:Install Podman Doc:https://minikube.sigs.k8s.io/docs/drivers/podman/}
I1110 13:54:54.954853  136584 global.go:119] ssh default: false priority: 4, state: {Installed:true Healthy:true Running:false NeedsImprovement:false Error:<nil> Reason: Fix: Doc:}
I1110 13:54:55.555823  136584 global.go:119] virtualbox default: true priority: 6, state: {Installed:true Healthy:true Running:false NeedsImprovement:false Error:<nil> Reason: Fix: Doc:}
I1110 13:54:55.556069  136584 global.go:119] vmware default: true priority: 7, state: {Installed:false Healthy:false Running:false NeedsImprovement:false Error:exec: "docker-machine-driver-vmware": executable file not found in $PATH Reason: Fix:Install docker-machine-driver-vmware Doc:https://minikube.sigs.k8s.io/docs/reference/drivers/vmware/}
I1110 13:54:55.676927  136584 docker.go:132] docker version: linux-20.10.10
I1110 13:54:55.677107  136584 cli_runner.go:115] Run: docker system info --format "{{json .}}"
I1110 13:54:55.783657  136584 info.go:263] docker info: {ID:UMQ7:BZQN:CISM:XUPI:LNRP:2X4S:C6NB:RPOI:VHOA:EFOI:UM5N:NZSL Containers:1 ContainersRunning:0 ContainersPaused:0 ContainersStopped:1 Images:237 Driver:overlay2 DriverStatus:[[Backing Filesystem extfs] [Supports d_type true] [Native Overlay Diff true] [userxattr false]] SystemStatus:<nil> Plugins:{Volume:[local] Network:[bridge host ipvlan macvlan null overlay] Authorization:<nil> Log:[awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog]} MemoryLimit:true SwapLimit:false KernelMemory:true KernelMemoryTCP:true CPUCfsPeriod:true CPUCfsQuota:true CPUShares:true CPUSet:true PidsLimit:true IPv4Forwarding:true BridgeNfIptables:true BridgeNfIP6Tables:true Debug:false NFd:26 OomKillDisable:true NGoroutines:34 SystemTime:2021-11-10 13:54:55.723416791 +0000 UTC LoggingDriver:json-file CgroupDriver:cgroupfs NEventsListener:0 KernelVersion:5.4.0-90-generic OperatingSystem:Ubuntu 20.04.3 LTS OSType:linux Architecture:x86_64 IndexServerAddress:https://index.docker.io/v1/ RegistryConfig:{AllowNondistributableArtifactsCIDRs:[] AllowNondistributableArtifactsHostnames:[] InsecureRegistryCIDRs:[127.0.0.0/8] IndexConfigs:{DockerIo:{Name:docker.io Mirrors:[] Secure:true Official:true}} Mirrors:[]} NCPU:4 MemTotal:16636239872 GenericResources:<nil> DockerRootDir:/var/lib/docker HTTPProxy: HTTPSProxy: NoProxy: Name:csh-Precision-5520 Labels:[] ExperimentalBuild:false ServerVersion:20.10.10 ClusterStore: ClusterAdvertise: Runtimes:{Runc:{Path:runc}} DefaultRuntime:runc Swarm:{NodeID: NodeAddr: LocalNodeState:inactive ControlAvailable:false Error: RemoteManagers:<nil>} LiveRestoreEnabled:false Isolation: InitBinary:docker-init ContainerdCommit:{ID:5b46e404f6b9f661a205e28d59c982d3634148f8 Expected:5b46e404f6b9f661a205e28d59c982d3634148f8} RuncCommit:{ID:v1.0.2-0-g52b36a2 Expected:v1.0.2-0-g52b36a2} InitCommit:{ID:de40ad0 Expected:de40ad0} SecurityOptions:[name=apparmor name=seccomp,profile=default] ProductLicense: Warnings:[WARNING: No swap limit support] ServerErrors:[] ClientInfo:{Debug:false Plugins:[map[Experimental:true Name:app Path:/usr/libexec/docker/cli-plugins/docker-app SchemaVersion:0.1.0 ShortDescription:Docker App Vendor:Docker Inc. Version:v0.9.1-beta3] map[Name:buildx Path:/usr/libexec/docker/cli-plugins/docker-buildx SchemaVersion:0.1.0 ShortDescription:Build with BuildKit Vendor:Docker Inc. Version:v0.6.3-docker] map[Name:scan Path:/usr/libexec/docker/cli-plugins/docker-scan SchemaVersion:0.1.0 ShortDescription:Docker Scan Vendor:Docker Inc. Version:v0.9.0]] Warnings:<nil>}}
I1110 13:54:55.783771  136584 docker.go:237] overlay module found
I1110 13:54:55.783779  136584 global.go:119] docker default: true priority: 9, state: {Installed:true Healthy:true Running:false NeedsImprovement:false Error:<nil> Reason: Fix: Doc:}
I1110 13:54:55.783801  136584 driver.go:278] not recommending "none" due to default: false
I1110 13:54:55.783807  136584 driver.go:278] not recommending "ssh" due to default: false
I1110 13:54:55.783820  136584 driver.go:313] Picked: docker
I1110 13:54:55.783827  136584 driver.go:314] Alternatives: [kvm2 virtualbox none ssh]
I1110 13:54:55.783834  136584 driver.go:315] Rejects: [podman vmware]
I1110 13:54:55.788405  136584 out.go:176] ✨  Automatically selected the docker driver. Other choices: kvm2, virtualbox, none, ssh
✨  Automatically selected the docker driver. Other choices: kvm2, virtualbox, none, ssh
I1110 13:54:55.788426  136584 start.go:280] selected driver: docker
I1110 13:54:55.788430  136584 start.go:762] validating driver "docker" against <nil>
I1110 13:54:55.788445  136584 start.go:773] status for docker: {Installed:true Healthy:true Running:false NeedsImprovement:false Error:<nil> Reason: Fix: Doc:}
I1110 13:54:55.792551  136584 out.go:176] 

W1110 13:54:55.792756  136584 out.go:241] ❌  Exiting due to MK_USAGE: Sorry, one of the ports provided with --ports flag is not valid [127.0.0.1:443:443 127.0.0.1:80:80]
❌  Exiting due to MK_USAGE: Sorry, one of the ports provided with --ports flag is not valid [127.0.0.1:443:443 127.0.0.1:80:80]
I1110 13:54:55.797155  136584 out.go:176] 

# Try to create a minikube container exposing port `443` and port `80` on all host IPs
minikube start  --ports=443:443 --ports=80:80 --profile minikube-1-24-0 --alsologtostderr
I1110 13:55:31.009446  136723 out.go:297] Setting OutFile to fd 1 ...
I1110 13:55:31.009595  136723 out.go:349] isatty.IsTerminal(1) = true
I1110 13:55:31.009603  136723 out.go:310] Setting ErrFile to fd 2...
I1110 13:55:31.009610  136723 out.go:349] isatty.IsTerminal(2) = true
I1110 13:55:31.009720  136723 root.go:313] Updating PATH: /home/mans0954/.minikube/bin
I1110 13:55:31.010018  136723 out.go:304] Setting JSON to false
I1110 13:55:31.032277  136723 start.go:112] hostinfo: {"hostname":"csh-Precision-5520","uptime":64980,"bootTime":1636487551,"procs":385,"os":"linux","platform":"ubuntu","platformFamily":"debian","platformVersion":"20.04","kernelVersion":"5.4.0-90-generic","kernelArch":"x86_64","virtualizationSystem":"kvm","virtualizationRole":"host","hostId":"64767abe-73ce-4bf8-b1b0-0d468395d171"}
I1110 13:55:31.032426  136723 start.go:122] virtualization: kvm host
I1110 13:55:31.037013  136723 out.go:176] 😄  [minikube-1-24-0] minikube v1.24.0 on Ubuntu 20.04
😄  [minikube-1-24-0] minikube v1.24.0 on Ubuntu 20.04
I1110 13:55:31.037150  136723 notify.go:174] Checking for updates...
I1110 13:55:31.037612  136723 config.go:176] Loaded profile config "minikube": Driver=docker, ContainerRuntime=docker, KubernetesVersion=v1.22.2
I1110 13:55:31.037663  136723 driver.go:343] Setting default libvirt URI to qemu:///system
I1110 13:55:31.037684  136723 global.go:111] Querying for installed drivers using PATH=/home/mans0954/.minikube/bin:/home/mans0954/.elan/bin:/home/mans0954/.local/bin:/usr/local/go/bin:/home/mans0954/.elan/bin:/home/mans0954/bin:/usr/share/rvm/gems/ruby-2.7.1/bin:/usr/share/rvm/gems/ruby-2.7.1@global/bin:/usr/share/rvm/rubies/ruby-2.7.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/share/rvm/bin:/home/mans0954/go/bin
I1110 13:55:31.072992  136723 global.go:119] kvm2 default: true priority: 8, state: {Installed:true Healthy:true Running:true NeedsImprovement:false Error:<nil> Reason: Fix: Doc:}
I1110 13:55:31.130711  136723 global.go:119] none default: false priority: 4, state: {Installed:true Healthy:true Running:false NeedsImprovement:false Error:<nil> Reason: Fix: Doc:}
I1110 13:55:31.130836  136723 global.go:119] podman default: true priority: 7, state: {Installed:false Healthy:false Running:false NeedsImprovement:false Error:exec: "podman": executable file not found in $PATH Reason: Fix:Install Podman Doc:https://minikube.sigs.k8s.io/docs/drivers/podman/}
I1110 13:55:31.130861  136723 global.go:119] ssh default: false priority: 4, state: {Installed:true Healthy:true Running:false NeedsImprovement:false Error:<nil> Reason: Fix: Doc:}
I1110 13:55:31.579594  136723 global.go:119] virtualbox default: true priority: 6, state: {Installed:true Healthy:true Running:false NeedsImprovement:false Error:<nil> Reason: Fix: Doc:}
I1110 13:55:31.579725  136723 global.go:119] vmware default: true priority: 7, state: {Installed:false Healthy:false Running:false NeedsImprovement:false Error:exec: "docker-machine-driver-vmware": executable file not found in $PATH Reason: Fix:Install docker-machine-driver-vmware Doc:https://minikube.sigs.k8s.io/docs/reference/drivers/vmware/}
I1110 13:55:31.633413  136723 docker.go:132] docker version: linux-20.10.10
I1110 13:55:31.633506  136723 cli_runner.go:115] Run: docker system info --format "{{json .}}"
I1110 13:55:31.719788  136723 info.go:263] docker info: {ID:UMQ7:BZQN:CISM:XUPI:LNRP:2X4S:C6NB:RPOI:VHOA:EFOI:UM5N:NZSL Containers:1 ContainersRunning:0 ContainersPaused:0 ContainersStopped:1 Images:237 Driver:overlay2 DriverStatus:[[Backing Filesystem extfs] [Supports d_type true] [Native Overlay Diff true] [userxattr false]] SystemStatus:<nil> Plugins:{Volume:[local] Network:[bridge host ipvlan macvlan null overlay] Authorization:<nil> Log:[awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog]} MemoryLimit:true SwapLimit:false KernelMemory:true KernelMemoryTCP:true CPUCfsPeriod:true CPUCfsQuota:true CPUShares:true CPUSet:true PidsLimit:true IPv4Forwarding:true BridgeNfIptables:true BridgeNfIP6Tables:true Debug:false NFd:26 OomKillDisable:true NGoroutines:34 SystemTime:2021-11-10 13:55:31.667354986 +0000 UTC LoggingDriver:json-file CgroupDriver:cgroupfs NEventsListener:0 KernelVersion:5.4.0-90-generic OperatingSystem:Ubuntu 20.04.3 LTS OSType:linux Architecture:x86_64 IndexServerAddress:https://index.docker.io/v1/ RegistryConfig:{AllowNondistributableArtifactsCIDRs:[] AllowNondistributableArtifactsHostnames:[] InsecureRegistryCIDRs:[127.0.0.0/8] IndexConfigs:{DockerIo:{Name:docker.io Mirrors:[] Secure:true Official:true}} Mirrors:[]} NCPU:4 MemTotal:16636239872 GenericResources:<nil> DockerRootDir:/var/lib/docker HTTPProxy: HTTPSProxy: NoProxy: Name:csh-Precision-5520 Labels:[] ExperimentalBuild:false ServerVersion:20.10.10 ClusterStore: ClusterAdvertise: Runtimes:{Runc:{Path:runc}} DefaultRuntime:runc Swarm:{NodeID: NodeAddr: LocalNodeState:inactive ControlAvailable:false Error: RemoteManagers:<nil>} LiveRestoreEnabled:false Isolation: InitBinary:docker-init ContainerdCommit:{ID:5b46e404f6b9f661a205e28d59c982d3634148f8 Expected:5b46e404f6b9f661a205e28d59c982d3634148f8} RuncCommit:{ID:v1.0.2-0-g52b36a2 Expected:v1.0.2-0-g52b36a2} InitCommit:{ID:de40ad0 Expected:de40ad0} SecurityOptions:[name=apparmor name=seccomp,profile=default] ProductLicense: Warnings:[WARNING: No swap limit support] ServerErrors:[] ClientInfo:{Debug:false Plugins:[map[Experimental:true Name:app Path:/usr/libexec/docker/cli-plugins/docker-app SchemaVersion:0.1.0 ShortDescription:Docker App Vendor:Docker Inc. Version:v0.9.1-beta3] map[Name:buildx Path:/usr/libexec/docker/cli-plugins/docker-buildx SchemaVersion:0.1.0 ShortDescription:Build with BuildKit Vendor:Docker Inc. Version:v0.6.3-docker] map[Name:scan Path:/usr/libexec/docker/cli-plugins/docker-scan SchemaVersion:0.1.0 ShortDescription:Docker Scan Vendor:Docker Inc. Version:v0.9.0]] Warnings:<nil>}}
I1110 13:55:31.719922  136723 docker.go:237] overlay module found
I1110 13:55:31.719931  136723 global.go:119] docker default: true priority: 9, state: {Installed:true Healthy:true Running:false NeedsImprovement:false Error:<nil> Reason: Fix: Doc:}
I1110 13:55:31.719945  136723 driver.go:278] not recommending "none" due to default: false
I1110 13:55:31.719953  136723 driver.go:278] not recommending "ssh" due to default: false
I1110 13:55:31.719971  136723 driver.go:313] Picked: docker
I1110 13:55:31.719975  136723 driver.go:314] Alternatives: [kvm2 virtualbox none ssh]
I1110 13:55:31.719980  136723 driver.go:315] Rejects: [podman vmware]
I1110 13:55:31.724144  136723 out.go:176] ✨  Automatically selected the docker driver. Other choices: kvm2, virtualbox, none, ssh
✨  Automatically selected the docker driver. Other choices: kvm2, virtualbox, none, ssh
I1110 13:55:31.724161  136723 start.go:280] selected driver: docker
I1110 13:55:31.724165  136723 start.go:762] validating driver "docker" against <nil>
I1110 13:55:31.724189  136723 start.go:773] status for docker: {Installed:true Healthy:true Running:false NeedsImprovement:false Error:<nil> Reason: Fix: Doc:}
I1110 13:55:31.728489  136723 out.go:176] 

W1110 13:55:31.728707  136723 out.go:241] ❌  Exiting due to MK_USAGE: Sorry, you cannot use privileged ports on the host (below 1024) [443:443 80:80]
❌  Exiting due to MK_USAGE: Sorry, you cannot use privileged ports on the host (below 1024) [443:443 80:80]
I1110 13:55:31.733154  136723 out.go:176] 

It seems to me that there are two problems here:

  • validatePorts fails to recognise IP:Port:Port as valid
  • validatePorts rejects the use of privileged ports on Ubuntu 20.04, even though this works fine in practice.

Please could the previous behaviour be re-instated? Thanks.

@mans0954
Copy link
Author

This problem appears to have been introduced by #12233 in response to #10495.

@spowelljr spowelljr self-assigned this Nov 16, 2021
@spowelljr spowelljr added kind/regression Categorizes issue or PR as related to a regression from a prior release. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. labels Nov 16, 2021
@spowelljr spowelljr added this to the 1.25.0 milestone Nov 16, 2021
@mans0954
Copy link
Author

mans0954 commented Dec 2, 2021

With a build of latest master branch, this looks like it's now doing what I'd expect. Thanks very much!

# Build latest
git pull
make

# Start minikube, exposing port `443` on `127.0.0.1:443` and port `80` `127.0.0.1:80`
out/minikube start  --ports=127.0.0.1:443:443 --ports=127.0.0.1:80:80 --profile minikube-dev --alsologtostderr
...

# Inspect the container
docker inspect minikube-dev | jq .[0].NetworkSettings.Ports
{
  "22/tcp": [
    {
      "HostIp": "127.0.0.1",
      "HostPort": "49157"
    }
  ],
  "2376/tcp": [
    {
      "HostIp": "127.0.0.1",
      "HostPort": "49156"
    }
  ],
  "32443/tcp": [
    {
      "HostIp": "127.0.0.1",
      "HostPort": "49153"
    }
  ],
  "443/tcp": [
    {
      "HostIp": "127.0.0.1",
      "HostPort": "443"
    }
  ],
  "5000/tcp": [
    {
      "HostIp": "127.0.0.1",
      "HostPort": "49155"
    }
  ],
  "80/tcp": [
    {
      "HostIp": "127.0.0.1",
      "HostPort": "80"
    }
  ],
  "8443/tcp": [
    {
      "HostIp": "127.0.0.1",
      "HostPort": "49154"
    }
  ]
}

# Enable the ingress addon
$ minikube addons enable ingress --profile minikube-dev
    ▪ Using image k8s.gcr.io/ingress-nginx/controller:v1.0.0-beta.3
    ▪ Using image k8s.gcr.io/ingress-nginx/kube-webhook-certgen:v1.0
    ▪ Using image k8s.gcr.io/ingress-nginx/kube-webhook-certgen:v1.0
🔎  Verifying ingress addon...
🌟  The 'ingress' addon is enabled

# Check that nginx ingress responds to HTTP requests on `127.0.0.1:80`
$ curl --head http://127.0.0.1
HTTP/1.1 404 Not Found
Date: Thu, 02 Dec 2021 15:43:08 GMT
Content-Type: text/html
Content-Length: 146
Connection: keep-alive

# Check that  nginx ingress responds to HTTPS requests on `127.0.0.1:443`
$ curl --head -k https://127.0.0.1
HTTP/2 404 
date: Thu, 02 Dec 2021 15:43:18 GMT
content-type: text/html
content-length: 146

# Check that ports are exposed only on 127.0.0.1
$ curl http://127.0.0.2
curl: (7) Failed to connect to 127.0.0.2 port 80: Connection refused
$ curl -k https://127.0.0.2

curl: (7) Failed to connect to 127.0.0.2 port 443: Connection refused

# clean up
$ minikube delete --profile minikube-dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/regression Categorizes issue or PR as related to a regression from a prior release. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants