calicoctl ipam check

This section describes the calicoctl ipam check command.

Read the calicoctl overview for a full list of calicoctl commands.

Displaying the help text for ‘calicoctl ipam check’ command

Run calicoctl ipam check --help to display the following help menu for the command.

  1. Usage:
  2. calicoctl ipam check [--config=<CONFIG>] [--show-all-ips] [--show-problem-ips] [-o <FILE>]
  3. Options:
  4. -h --help Show this screen.
  5. -o --output=<FILE> Path to output report file.
  6. --show-all-ips Print all IPs that are checked.
  7. --show-problem-ips Print all IPs that are leaked or not allocated properly.
  8. -c --config=<CONFIG> Path to the file containing connection configuration in
  9. YAML or JSON format.
  10. [default: /etc/calico/calicoctl.cfg]
  11. Description:
  12. The ipam check command checks the integrity of the IPAM datastructures against Kubernetes.

Examples

Example workflow for checking consistency and releasing leaked addresses.

Lock the data store

  1. calicoctl datastore migrate lock

calicoctl ipam check - 图1note

Once the data store is locked, new pods will not be able to be launched until the data store is unlocked.

Generate a report using the check command

  1. calicoctl ipam check -o report.json

Release any unnecessary addresses

  1. calicoctl ipam release --from-report report.json

Unlock the data store

  1. calicoctl datastore migrate unlock

See also