问题描述:
    在docker容器中运行一个k3s集群,启动一个Pod,指定其hostPort字段为80端口,更新Deploy后Pod为Pending状态,无法启动,Status为当前node上端口被占用
    环境:
    suseLinux

    检查端口占用情况

    zypper install net-tools

    1. Deprecated Tool Alternative Tool
    2. arp ip n
    3. ifconfig ip a
    4. ipmaddr ip maddr
    5. iptunnel ip tunnel
    6. netstat ss
    7. ip route (netstat -r)
    8. ip -s link (netstat -i)
    9. route ip r
    10. mii-tool ethtool
    11. nameif ifrename

    使用ss查看端口占用情况
    ss -alnp|grep 8888
    发现没有监听

    查看iptables
    zypper install iptables

    kubectl get po -owide
    查看到前端服务对应的Pod ip为10.42.1.17

    zypper install iproute2

    https://commandnotfound.cn/linux/1/232/ss-%E5%91%BD%E4%BB%A4
    https://blog.csdn.net/weixin_41282397/article/details/85705848
    https://blog.csdn.net/samson_www/article/details/80377431

    k8s中的hostPort
    https://developer.aliyun.com/article/796076

    https://www.cnblogs.com/sztom/p/10810508.html