This document explains how to install calicoctl in a kubernetes cluster to check the peering status.
1. Download calicoctl to /usr/local/bin
curl -O -L https://github.com/projectcalico/calicoctl/releases/download/v3.4.0/calicoctl
chmod +x calicoctl
2. Create calicoctl.cfg in /etc/calico folder on each nodes
root@worker1:/usr/local/bin# cat /etc/calico/calicoctl.cfg
cat /etc/calico/calicoctl.cfg
apiVersion: projectcalico.org/v3
kind: CalicoAPIConfig
metadata:
spec:
datastoreType: "kubernetes"
kubeconfig: "/root/.kube/config" ## point to your kube config of the cluster
3. Check the status from each nodes
root@worker1:/usr/local/bin# calicoctl node status
Calico process is running.
IPv4 BGP status
+--------------+-------------------+-------+----------+-------------+
| PEER ADDRESS | PEER TYPE | STATE | SINCE | INFO |
+--------------+-------------------+-------+----------+-------------+
| 172.16.0.6 | node-to-node mesh | up | 08:27:06 | Established |
+--------------+-------------------+-------+----------+-------------+
1. Download calicoctl to /usr/local/bin
curl -O -L https://github.com/projectcalico/calicoctl/releases/download/v3.4.0/calicoctl
chmod +x calicoctl
2. Create calicoctl.cfg in /etc/calico folder on each nodes
root@worker1:/usr/local/bin# cat /etc/calico/calicoctl.cfg
cat /etc/calico/calicoctl.cfg
apiVersion: projectcalico.org/v3
kind: CalicoAPIConfig
metadata:
spec:
datastoreType: "kubernetes"
kubeconfig: "/root/.kube/config" ## point to your kube config of the cluster
3. Check the status from each nodes
root@worker1:/usr/local/bin# calicoctl node status
Calico process is running.
IPv4 BGP status
+--------------+-------------------+-------+----------+-------------+
| PEER ADDRESS | PEER TYPE | STATE | SINCE | INFO |
+--------------+-------------------+-------+----------+-------------+
| 172.16.0.6 | node-to-node mesh | up | 08:27:06 | Established |
+--------------+-------------------+-------+----------+-------------+
No comments:
Post a Comment