Skip to main content
Calico Open Source 3.33 (latest) documentation

Calico node status

A Calico node status resource (CalicoNodeStatus) represents status information for a node, for use during troubleshooting. You create a CalicoNodeStatus resource for the node you want to inspect, and Calico periodically writes the collected information to the resource's status field. CalicoNodeStatus is a cluster-scoped resource.

Status of Border Gateway Protocol (BGP) agents, BGP sessions, and routes exposed to BGP agents is collected from Linux nodes only. Windows nodes are not supported at this time. The resource is valid only when Calico BGP networking is in use.

For kubectl commands, you can use the aliases caliconodestatus.projectcalico.org, caliconodestatuses.projectcalico.org, caliconodestatus.p, and caliconodestatuses.p.

Sample YAML​

This sample collects agent, BGP, and route status for node my-kadm-node-0 every 10 seconds.

kubectl apply -f -<<EOF
apiVersion: projectcalico.org/v3
kind: CalicoNodeStatus
metadata:
name: my-caliconodestatus-1
spec:
classes:
- Agent
- BGP
- Routes
node: my-kadm-node-0
updatePeriodSeconds: 10
EOF

To see the results, read back the resource with kubectl get caliconodestatus my-caliconodestatus-1 -o yaml. The collected information is in the status field. For example:

apiVersion: projectcalico.org/v3
kind: CalicoNodeStatus
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"projectcalico.org/v3","kind":"CalicoNodeStatus","metadata":{"annotations":{},"name":"my-caliconodestatus-1"},"spec":{"classes":["Agent","BGP","Routes"],"node":"my-kadm-node-0","updatePeriodSeconds":10}}
creationTimestamp: '2021-10-18T10:30:43Z'
generation: 139
name: my-caliconodestatus-1
resourceVersion: '203255'
uid: 6e3b676b-546a-41db-aeda-ad44f25ff73f
spec:
classes:
- Agent
- BGP
- Routes
node: my-kadm-node-0
updatePeriodSeconds: 10
status:
agent:
birdV4:
lastBootTime: '2021-10-18 09:23:19'
lastReconfigurationTime: '2021-10-18 09:23:19'
routerID: 10.128.0.240
state: Ready
version: v0.3.3+birdv1.6.8
birdV6:
lastBootTime: '2021-10-18 09:23:19'
lastReconfigurationTime: '2021-10-18 09:23:19'
routerID: 10.128.0.240
state: Ready
version: v0.3.3+birdv1.6.8
bgp:
numberEstablishedV4: 2
numberEstablishedV6: 0
numberNotEstablishedV4: 1
numberNotEstablishedV6: 0
peersV4:
- peerIP: 10.128.0.242
since: '09:23:22'
state: Established
type: NodeMesh
- peerIP: 10.128.0.200
since: '09:23:21'
state: Established
type: NodeMesh
- peerIP: 10.128.0.241
since: '09:23:22'
state: OpenSent
type: NodeMesh
lastUpdated: '2021-10-18T13:22:03Z'
routes:
routesV4:
- destination: 0.0.0.0/0
gateway: 172.18.0.1
interface: eth0
learnedFrom:
sourceType: Kernel
type: FIB
- destination: 192.168.82.0/26
gateway: 10.128.0.200
interface: eth0
learnedFrom:
peerIP: 10.128.0.200
sourceType: NodeMesh
type: FIB
- destination: 192.168.36.0/26
gateway: 10.128.0.242
interface: eth0
learnedFrom:
peerIP: 10.128.0.242
sourceType: NodeMesh
type: FIB
- destination: 10.128.0.5/16
gateway: N/A
interface: eth0
learnedFrom:
sourceType: Direct
type: FIB

Definition​

Metadata​

FieldDescriptionAccepted ValuesSchemaDefault
nameThe name of this Calico node status. Required.Lowercase alphanumeric characters, -, or .. Must start and end with an alphanumeric character. Up to 253 characters.string

Spec​

FieldDescriptionAccepted ValuesSchemaDefault
classesList of classes that declare the types of information to monitor for this node and allows for selective status reporting about certain subsets of information. Required.List of Classeslist of strings
nodeThe node name identifies the Calico node instance to collect node status for. Required.valid Kubernetes node namestring
updatePeriodSecondsPeriod in seconds at which CalicoNodeStatus should be updated. Set to 0 to disable CalicoNodeStatus refresh. Maximum update period is one day. Required.0 to 86400integer

Classes​

Accepted ValuesDescription
AgentStatus of BGP daemon agent
BGPStatus of BGP sessions
RoutesStatus of routes exposed to BGP daemon

CalicoNodeAgentStatus​

FieldDescriptionAccepted ValuesSchemaDefault
birdV4Status of the IPv4 BIRD daemon.BGPDaemonStatus
birdV6Status of the IPv6 BIRD daemon.BGPDaemonStatus

BGPDaemonStatus​

FieldDescriptionAccepted ValuesSchemaDefault
stateState of BGP daemon.Ready, NotReadystring
versionVersion of BGP daemonstring
routerIDRouter ID used by BGP daemonstring
lastBootTimeLast boot time of BGP daemonstring
lastReconfigurationTimeLast reconfiguration time of BGP daemonstring

CalicoNodeBGPStatus​

FieldDescriptionAccepted ValuesSchemaDefault
numberEstablishedV4The total number of IPv4 established BGP sessions.integer
numberNotEstablishedV4The total number of IPv4 non-established BGP sessions.integer
numberEstablishedV6The total number of IPv6 established BGP sessions.integer
numberNotEstablishedV6The total number of IPv6 non-established BGP sessions.integer
peersV4IPv4 BGP peers status on the node.list of CalicoNodePeer
peersV6IPv6 BGP peers status on the node.list of CalicoNodePeer

CalicoNodeBGPRouteStatus​

FieldDescriptionAccepted ValuesSchemaDefault
routesV4IPv4 routes learned by BGP daemon on the node.list of CalicoNodeRoute
routesV6IPv6 routes learned by BGP daemon on the node.list of CalicoNodeRoute

CalicoNodePeer​

FieldDescriptionAccepted ValuesSchemaDefault
peerIPIP address of the peer whose condition we are reporting.An IP addressstring
typeType indicates whether this peer is configured via the node-to-node mesh, or via en explicit global or per-node BGPPeer object.NodeMesh, NodePeer, GlobalPeerstring
stateBGP session state. Value of an empty string means BGP session state is unknown.Idle, Connect, Active, OpenSent, OpenConfirm, Established, Closestring
sinceTimestamp of last BGP session state change.string

CalicoNodeRoute​

FieldDescriptionAccepted ValuesSchemaDefault
typeType indicates if the route is being used for forwarding or not.FIB, RIBstring
destinationDestination CIDR of the route.A CIDRstring
gatewayGateway IP of the route. If the route does not involve a gateway, for example a direct route, the value is N/A.An IP address, or N/Astring
interfaceNetwork interface for the destination. For a blackhole route, the value is blackhole. For a unreachable route, the value is unreachable.string
learnedFromInformation regarding where this route originated.CalicoNodeRouteLearnedFrom

CalicoNodeRouteLearnedFrom​

FieldDescriptionAccepted ValuesSchemaDefault
sourceTypeType of the source where a route is learned from.Kernel, Static, Direct, NodeMesh, BGPPeerstring
peerIPIf sourceType is NodeMesh or BGPPeer, IP address of the router that sent us this route. For a BGPPeer session with a port set, in peerIP or through a BGPConfiguration listenPort, the value also contains the port, for example 10.0.0.1.port.1790.string

Status​

FieldDescriptionAccepted ValuesSchemaDefault
lastUpdatedTimestamp representing the server time when the CalicoNodeStatus object last updated. It is represented in RFC3339 form and is in UTC.
agentBGP daemon status on the node.CalicoNodeAgentStatus
bgpBGP status on the node. peersV4 holds status of IPv4 BGP peers, peersV6 holds status of IPv6 BGP peers.CalicoNodeBGPStatus
routesRoute status learned by BGP daemon on the node. routesV4 holds status of IPv4 routes, routesV6 holds status of IPv6 routes.CalicoNodeBGPRouteStatus

Performance impact​

Updating CalicoNodeStatus has a small performance impact on CPU and memory usage of the node, and adds load to the Kubernetes API server.

In our testing on a ten node, full mesh cluster, a CalicoNodeStatus resource was created for each node where the update interval was set to ten seconds. On each node, this resulted in an increase in CPU use of 5% of a vCPU and an increase of 4MB of memory. The control plane node recorded an increase in CPU usage of 5% of a vCPU for these 10 nodes.

caution

The implementation of CalicoNodeStatus is designed to handle a small number of nodes (less than 10 is recommended) reporting back status in the same time. If CalicoNodeStatus are created for a large number of nodes, and with short update interval, the Kubernetes API server may become slower and less responsive. You should create CalicoNodeStatus for the node you are interested in and for debugging purpose only. CalicoNodeStatus resource should be deleted upon the completion of the debugging process.

Additional resources​