Skip to main content
Version: 3.18 (latest)

calicoq eval

calicoq eval <selector> is used to display the endpoints that are matched by <selector>.

Examples​

To find all endpoints that match the role=='frontend' selector, i.e. that have a role label with value frontend:

calicoq eval "role=='frontend'"

Sample output follows.

Endpoints matching selector role=='frontend':
Host endpoint webserver1/eth0
Host endpoint webserver2/eth0

To find all endpoints that have an app label (with any value):

calicoq eval "has(app)"

Sample output follows.

Endpoints matching selector has(app):
Workload endpoint rack1-host1/k8s/default.frontend-5gs43/eth0

(In this case the answer is a Kubernetes pod.)

To find endpoint for a selector that does not match any endpoints:

calicoq eval "role=='endfront'"

Sample output follows.

Endpoints matching selector role=='endfront':

See also​