Migrate Calico to Kubernetes Datastore Driver (KDD) from etcd

Important

Before you attempt to enable KDD, Mirantis strongly suggests that you make a backup, as you cannot go back to non-KDD/etcd from KDD or recover from a failure in moving to KDD without rolling the cluster back to a known good state in which it was using an etcdv3 datastore.

  1. Obtain the MKE 3 configuration file:

    export MKE_USERNAME=<mke-username>
    export MKE_PASSWORD=<mke-password>
    export MKE_HOST=<mke-fqdn-or-ip-address>
    AUTHTOKEN=$(curl --silent --insecure --data '{"username":"'$MKE_USERNAME'","password":"'$MKE_PASSWORD'"}' https://$MKE_HOST/auth/login | jq --raw-output .auth_token)
    curl --silent --insecure -X GET "https://$MKE_HOST/api/ucp/config-toml" -H "accept: application/toml" -H "Authorization: Bearer $AUTHTOKEN" > mke-config.toml
    
  2. In the cluster_config section of the MKE 3 configuration file, check the setting of the calico_kdd parameter. If it is set to true, skip the remaining steps. Otherwise, edit the setting to true.

  3. Apply the modified MKE 3 configuration file:

    $ curl --silent --insecure -X PUT -H "accept: application/toml" -H "Authorization: Bearer $AUTHTOKEN" --upload-file 'mke-config.toml' https://$MKE_HOST/api/ucp/config-toml
    

On completion, the following confirmation displays:

{"message":"Calico datastore upgrade from etcd to kdd successful"}

Refer to the official Calico documentation, Configure calicoctl to connect to the Kubernetes API datastore for more information on KDD.