其他分享
首页 > 其他分享> > Calico 绑定网卡

Calico 绑定网卡

作者:互联网

## 配置calicoctl

https://docs.projectcalico.org/getting-started/clis/calicoctl/install

配置(多种配置方式):/etc/calico/calicoctl.cfg

apiVersion: projectcalico.org/v3
kind: CalicoAPIConfig
metadata:
spec:
  datastoreType: "etcdv3"
  etcdEndpoints: "https://192.168.1.1:2379"
  etcdKeyFile: "/etc/kubernetes/pki/apiserver-etcd-client.key"
  etcdCertFile: "/etc/kubernetes/pki/apiserver-etcd-client.crt"
  etcdCACertFile: "/etc/kubernetes/pki/etcd/ca.crt"

# 查看节点状态

calicoctl node status

# 删除节点

calicoctl delete node <node_name>

# 绑定网卡,在 calico-node 容器的环境变量中

- name: IP_AUTODETECTION_METHOD
  value: "interface=ens192"

# 清除节点网络信息

modprobe -r ipip
rm -rf /etc/cni/net.d/
rm -rf  /opt/cni/bin/
rm -rf /var/run/calico
rm -rf /var/lib/calico

# 重启 calico-node pod

# 检查 calicoct node status 

 

标签:node,calicoctl,绑定,calico,网卡,etc,rf,rm,Calico
来源: https://www.cnblogs.com/Javaknowledge/p/15194407.html