腾讯云容器集群:节点可以访问公网,节点内的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
相关推荐
凡间客8 分钟前
Ansible安装与入门
linux·运维·ansible
君以思为故9 分钟前
认识Linux -- 进程概念
linux·服务器
_OP_CHEN18 分钟前
Linux网络编程:(八)GCC/G++ 编译器完全指南:从编译原理到实战优化,手把手教你玩转 C/C++ 编译
linux·运维·c++·编译和链接·gcc/g++·编译优化·静态链接与动态链接
阿乐艾官29 分钟前
【十一、Linux管理网络安全】
linux·运维·web安全
在云上(oncloudai)1 小时前
AWS Fargate 与 AWS Lambda之间的区别详解
云计算·aws
喜欢你,还有大家2 小时前
Kubernetes-架构安装
架构·kubernetes·云计算
Code Warrior2 小时前
【Linux】Socket 编程预备知识
linux·网络·c++
摘星|3 小时前
架设一台NFS服务器,并按照以下要求配置
linux·运维·服务器
做运维的阿瑞3 小时前
Linux环境变量持久化完全指南
linux·运维·服务器
天才奇男子3 小时前
从零开始搭建Linux Web服务器
linux·服务器·前端