This sections describes the
calicoctl convert command.
Read the calicoctl command line interface user reference for a full list of calicoctl commands.
Note: The available actions for a specific resource type may be limited based on the datastore used for Calico (etcdv3 / Kubernetes API). Please refer to the Resources section for details about each resource type.
Displaying the help text for ‘calicoctl convert’ command
calicoctl convert --help to display the following help menu for the
Convert a set of resources (of mixed type) from Calico v1 to v3 APIs using the data in resources.yaml.
calicoctl convert -f multi-resource-v1.yaml -o yaml > multi-resource-v3.yaml
Tip: By default convert command outputs the converted resources to stdout, but it can be redirected to a file.
Convert a policy based on the JSON passed into stdin.
cat policy.json | calicoctl convert -f -
Result will be printed to stdout.