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

Block affinity

A block affinity resource (BlockAffinity) represents the affinity between a node and an IP address management (IPAM) block. Calico IPAM creates and manages these resources. Don't create, change, or delete them yourself. BlockAffinity is a cluster-scoped resource.

For kubectl commands, you can use the aliases blockaffinity.projectcalico.org, blockaffinities.projectcalico.org, blockaffinity.p, and blockaffinities.p.

Definition​

Metadata​

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

Spec​

FieldDescriptionAccepted ValuesSchemaDefault
stateState of the affinity with regard to any referenced IPAM blocks. Required.confirmed, pending, pendingDeletion, or emptystring
nodeThe node that this affinity is assigned to. Required.The name of the node, or load-balancer for blocks in a LoadBalancer IP poolstring
cidrThe CIDR range this block affinity references. Required.A valid IPv4 or IPv6 CIDR.string
deletedWhen set to true, clients should treat this block as if it does not exist.true, falsebooleanfalse

Additional resources​