腾讯云容器集群:节点可以访问公网,节点内的pod无法访问公网

腾讯云容器集群:节点可以访问公网,节点内的pod无法访问公网

shell 复制代码
curl https://www.baidu.com/index.htm

参考链接:https://cloud.tencent.com/document/product/457/50356
sysctl -a|grep net.ipv4.conf.all.rp_filter
sysctl -a|grep net.ipv4.conf.eth0.rp_filter
# net.ipv4.conf.all.rp_filter = 1
# net.ipv4.conf.eth0.rp_filter = 2

修改为:
sysctl -w net.ipv4.conf.all.rp_filter=0
sysctl -w net.ipv4.conf.eth0.rp_filter=0


存量节点同步网卡安全组设置的方法:https://cloud.tencent.com/document/product/457/50360

kubectl annotate node 10.20.1.20 --overwrite tke.cloud.tencent.com/disable-node-eni-security-groups="yes"
# 第一步执行完后等待2-5s
kubectl annotate node 10.20.1.20 --overwrite tke.cloud.tencent.com/disable-node-eni-security-groups="no"

连接集群:https://cloud.tencent.com/document/product/457/32191#846ac805-761e-4405-937c-052027e5580a
在线获取kubeconfig配置:https://cloud.tencent.com/document/api/457/48149


# 查看节点
kubectl get node
kubectl get node -o wide
相关推荐
i建模31 分钟前
Omarchy设置防火墙
linux·运维
S-码农1 小时前
Linux ——条件变量
linux·开发语言
爱写代码的liding1 小时前
linux安装软件过程中报找不到某些动态链接.so文件
linux
青衫码上行1 小时前
【项目部署】Spring Boot项目部署的四种方式
java·linux·服务器·spring boot·后端·docker·腾讯云
礼拜天没时间.2 小时前
JumpServer堡垒机部署与实战:从0到1搭建统一运维入口
linux·运维·架构·堡垒机·jumpserver·sre
林姜泽樾3 小时前
linux入门第四章,cd指令和相对、绝对路径
linux·运维·服务器
jjjxxxhhh1233 小时前
[Google Test]- Google Test Ubuntu 完整验证指南
linux·数据库·ubuntu
江畔何人初3 小时前
kubernetes中configmap与secret的区别
linux·运维·云原生·容器·kubernetes
夏乌_Wx3 小时前
mybash:简易 Shell 实现的设计思路与核心模块解析
linux·服务器·前端
程序员爱德华3 小时前
Linux中的 源 和 Channels
linux·channels·