• 通过修改etcd来设置或修改节点flannel子网信息


    在首次启动flannel服务的时候可以手动指定subnet.env文件,配置所在节点的flannel子网网段,如果不指定配置文件,flannel将自动分配一个子网网段并生成配置文件 /var/run/flannel/subnet.env,配置信息写入etcd集群。
    如果节点失效超时,etcd将清除该节点的子网信息。在不移除节点的情况下,修改配置文件并重启flannel服务,flannel会将etcd中的信息写回subnet.env,即subnet.env文件会被重置。因此必须通过修改etcd来修改节点flannel子网信息。

    [root@master1 ~]# etcdctl ls /coreos.com/network/subnets/
    /coreos.com/network/subnets/172.7.16.0-24
    /coreos.com/network/subnets/172.7.17.0-24
    /coreos.com/network/subnets/172.7.28.0-24
    
    [root@master1 ~]# etcdctl set /coreos.com/network/subnets/172.7.18.0-24 '{"PublicIP":"172.25.25.18","BackendType":"host-gw"}'
    {"PublicIP":"172.25.25.18","BackendType":"host-gw"}
    
    [root@master1 ~]# etcdctl ls /coreos.com/network/subnets/
    /coreos.com/network/subnets/172.7.16.0-24
    /coreos.com/network/subnets/172.7.17.0-24
    /coreos.com/network/subnets/172.7.28.0-24
    /coreos.com/network/subnets/172.7.18.0-24
    
    [root@master1 ~]# etcdctl get /coreos.com/network/subnets/172.7.28.0-24
    {"PublicIP":"172.25.25.18","BackendType":"host-gw"}
    [root@master1 ~]# etcdctl get /coreos.com/network/subnets/172.7.18.0-24
    {"PublicIP":"172.25.25.18","BackendType":"host-gw"}
    
    [root@master1 ~]# etcdctl rm /coreos.com/network/subnets/172.7.28.0-24
    PrevNode.Value: {"PublicIP":"172.25.25.18","BackendType":"host-gw"}
    
    [root@master1 ~]# etcdctl ls /coreos.com/network/subnets/
    /coreos.com/network/subnets/172.7.16.0-24
    /coreos.com/network/subnets/172.7.17.0-24
    /coreos.com/network/subnets/172.7.18.0-24
    
    [root@master1 ~]# etcdctl get /coreos.com/network/subnets/172.7.18.0-24
    {"PublicIP":"172.25.25.18","BackendType":"host-gw"}
    [root@master1 ~]# etcdctl get /coreos.com/network/subnets/172.7.17.0-24
    {"PublicIP":"172.25.25.17","BackendType":"host-gw"}
    [root@master1 ~]# etcdctl get /coreos.com/network/subnets/172.7.16.0-24
    {"PublicIP":"172.25.25.16","BackendType":"host-gw"}
  • 相关阅读:
    【AAAI2022】ShiftVIT: When Shift Operation Meets Vision Transformer
    【CVPR2021】Decoupled dynamic filter networks
    【ICLR2022】CrossFormer: A versatile vision transformer
    【ECCV2020】Spatially Adaptive Inference with Stochastic Feature Sampling and Interpolation
    【CVPR2022】Restormer: Efficient Transformer for HighResolution Image Restoration
    CondConv代码解析
    【ICCV2021】Context Reasoning Attention Network for Image SuperResolution
    【CVPR2021】Dynamic RegionAware Convolution
    【ARXIV2202】Visual Attention Network
    HybridSN代码修改
  • 原文地址:https://www.cnblogs.com/Wang-Hongwei/p/14154354.html
Copyright © 2020-2023  润新知