Skip to content

Unable to Connect to Port On Pod with Static IP #1474

@Richie-Rogers

Description

@Richie-Rogers

Hi,
Very much likely to be a config on my part, so seeking assistance.
I've attached a static IP to one of my pods (Home Assistant), which exposes a TCP port (8123).
I've correctly configured Home Assistant and am seeing network traffic (related to broadcast traffic required by Home Assistant).
On my LAN I can successfully ping the static IP. However, I can't connect to the Home Assistant UI or telnet to port 8123 on that static IP.

NetworkAttachmentDefinition:
apiVersion: k8s.cni.cncf.io/v1 kind: NetworkAttachmentDefinition metadata: name: primary-vlan namespace: default spec: config: '{ "cniVersion": "0.3.1", "name": "primary-vlan", "plugins": [ { "type": "macvlan", "master": "enp1s0", "mode": "bridge", "ipam": { "type": "static", "routes": [ { "dst": "192.168.0.0/16", "gw": "192.168.0.1" } ] } }, { "capabilities": { "mac": true, "ips": true }, "type": "tuning" } ] }'

Annotations on Home Assistant pod:
annotations: checksum/hass-configuration: ebefab982e512356895c0c493a4825a4269ec2a8df787c3264f067693b93a9e3 checksum/init-script: 490d99caab61d7092d315426ebaed17a827b88b2ad4e82ee1b568226ebb62b14 k8s.v1.cni.cncf.io/network-status: |- [{ "name": "cbr0", "interface": "eth0", "ips": [ "10.244.10.9" ], "mac": "6a:25:c4:32:c3:9b", "default": true, "dns": {}, "gateway": [ "10.244.10.1" ] },{ "name": "default/primary-vlan", "interface": "net1", "ips": [ "192.168.0.221" ], "mac": "ba:01:81:0e:cf:d2", "dns": {} }] k8s.v1.cni.cncf.io/networks: |- [ { "name": "primary-vlan", "namespace": "default", "ips": [ "192.168.0.221/16" ] } ]

Ping from a computer on LAN:
ping 192.168.0.221
PING 192.168.0.221 (192.168.0.221) 56(84) bytes of data.
64 bytes from 192.168.0.221: icmp_seq=1 ttl=63 time=0.352 ms
64 bytes from 192.168.0.221: icmp_seq=2 ttl=63 time=0.252 ms
64 bytes from 192.168.0.221: icmp_seq=3 ttl=63 time=0.433 ms

telnet:
telnet 192.168.0.221 8123
Trying 192.168.0.221...
telnet: Unable to connect to remote host: Connection timed out

Kubernetes Version:
kubectl get nodes
NAME STATUS ROLES AGE VERSION
kubprodmas01 Ready control-plane 501d v1.34.1
kubprodwkr01 Ready 254d v1.34.1
kubprodwkr02 Ready 253d v1.34.1
kubprodwkr03 Ready 195d v1.34.1
kubprodwkr04 Ready control-plane 258d v1.34.1

Multus version is at least 0.3.1 (I can't find anywhere to identify specific version.

Thanks,
Richie

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions