zoukankan      html  css  js  c++  java
  • K8S calicoctl 客户端工具安装


    1. 下载calicoctl二进制文件
    wget https://github.com/projectcalico/calicoctl/releases/download/v3.5.4/calicoctl -O /usr/bin/calicoctl
    chmod +x /usr/bin/calicoctl
    2. 临时测试
    DATASTORE_TYPE=kubernetes KUBECONFIG=~/.kube/config calicoctl get nodes

    3. 加入配置文件
    mkdir -p /etc/calico/

    root@master:/etc/calico# cat /etc/calico/calicoctl.cfg 
    apiVersion: projectcalico.org/v3
    kind: CalicoAPIConfig
    metadata:
    spec:
    datastoreType: "kubernetes"
    kubeconfig: "/home/master/.kube/config"
    4. calicoctl命令
    root@master:/etc/calico# calicoctl node status
    Calico process is running.
    
    IPv4 BGP status
    +----------------+-------------------+-------+----------+-------------+
    |  PEER ADDRESS  |     PEER TYPE     | STATE |  SINCE   |    INFO     |
    +----------------+-------------------+-------+----------+-------------+
    | 192.168.56.101 | node-to-node mesh | up    | 02:46:22 | Established |
    | 192.168.56.102 | node-to-node mesh | start | 02:46:21 | Passive     |
    +----------------+-------------------+-------+----------+-------------+
    
    IPv6 BGP status
    No IPv6 peers found. 

    node-node mesh: 代表所有节点用full mesh的bgp连接
     

    root@master:# netstat -anp | grep ESTABLISH | grep bird
    tcp 0 0 192.168.56.100:179 192.168.56.102:43827 ESTABLISHED 5185/bird
    tcp 0 0 192.168.56.100:179 192.168.56.101:54099 ESTABLISHED 5185/bird

    root@node1:~# netstat -anp | grep ESTABLISH | grep bird
    tcp 0 0 192.168.56.101:179 192.168.56.102:47975 ESTABLISHED 4487/bird
    tcp 0 0 192.168.56.101:54099 192.168.56.100:179 ESTABLISHED 4487/bird

    root@node2:/etc# netstat -anp | grep ESTABLISH | grep bird
    tcp 0 0 192.168.56.102:43827 192.168.56.100:179 ESTABLISHED 14014/bird
    tcp 0 0 192.168.56.102:47975 192.168.56.101:179 ESTABLISHED 14014/bird




  • 相关阅读:
    大数乘法的几种算法分析及比较(2014腾讯南京笔试题)
    【经典数据结构】Trie
    [LeetCode] MaximumDepth of Binary Tree
    [LeetCode] Minimum Depth of Binary Tree
    二叉树相关题目总结
    python之函数基础总结
    python基础之文件处理总结
    利用for循环和range输出9 * 9乘法口诀表
    购物车程序作业
    字典练习
  • 原文地址:https://www.cnblogs.com/reatual/p/14366009.html
Copyright © 2011-2022 走看看