更新时间:2021-08-26 GMT+08:00
分享

Node子网

在Kubernetes的网络规范中,要求Node可以和所有的Pod直接通信。为了达到这个目的Kube-OVN创建了一个join子网,并在每个Node节点创建了一块虚拟网卡ovn0接入join子网,通过该网络完成主机和Pod之间的网络互通。

如需更改Node子网配置,则需要在安装步骤时指定,参考配置内置网络章节。

  • 查看Node子网。
    1
    kubectl get subnet join -o yaml
    
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    apiVersion: kubeovn.io/v1
    kind: Subnet
    metadata:
      creationTimestamp: "2020-06-28T06:42:32Z"
      finalizers:
      - kube-ovn-controller
      generation: 2
      name: join
      resourceVersion: "749434"
      selfLink: /apis/kubeovn.io/v1/subnets/join
      uid: 3179fdc6-56a9-4211-a4c2-d922f4463adb
    spec:
      cidrBlock: 100.64.0.0/16
      default: false
      excludeIps:
      - 100.64.0.1
      gateway: 100.64.0.1
      gatewayNode: ""
      gatewayType: distributed
      natOutgoing: false
      private: false
      protocol: IPv4
      provider: ovn
      underlayGateway: false
    status:
      activateGateway: ""
      availableIPs: 65530
      conditions:
      - lastTransitionTime: "2020-06-28T06:42:33Z"
        lastUpdateTime: "2020-06-28T06:42:33Z"
        reason: ResetLogicalSwitchAclSuccess
        status: "True"
        type: Validated
      - lastTransitionTime: "2020-06-28T06:42:33Z"
        lastUpdateTime: "2020-06-28T06:42:33Z"
        reason: ResetLogicalSwitchAclSuccess
        status: "True"
        type: Ready
      - lastTransitionTime: "2020-06-28T06:42:33Z"
        lastUpdateTime: "2020-06-28T06:42:33Z"
        message: Not Observed
        reason: Init
        status: Unknown
        type: Error
      usingIPs: 3
    
  • 在Node节点查看ovn0网卡。
    1
    ifconfig ovn0
    
    1
    2
    3
    4
    5
    6
    7
    8
    ovn0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1400
            inet 100.64.0.2  netmask 255.255.0.0  broadcast 100.64.255.255
            inet6 fe80::200:ff:fec6:936d  prefixlen 64  scopeid 0x20<link>
            ether 00:00:00:c6:93:6d  txqueuelen 1000  (Ethernet)
            RX packets 5673864  bytes 530785977 (506.1 MiB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 5243874  bytes 8069050878 (7.5 GiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
分享:

    相关文档

    相关产品

close