Overview
Kommander requires a valid license to continue use beyond adding a second cluster. You can add a license via Kommander UI or by creating a resource object that references a secret containing the actual license, as described in the documentation.
When the apiVersion defined for the license object does not match, the following error is displayed:
> kubectl apply -f license.yaml error: unable to recognize "license.yaml": no matches for kind "License" in version "kommander.mesosphere.io/v1alpha2"
This error indicates that your Konvoy cluster does not support the kommander.mesosphere.io/v1alpha2 apiVersion that was specified in the license.yaml definition:
apiVersion: kommander.mesosphere.io/v1alpha2 kind: License metadata: name: my-license namespace: kommander spec: licenseRef: name: my-license-secret
You can verify which kommander apiVersions your cluster supports by issuing this command:
> kubectl api-versions | grep kommander authorizedlister.workspaces.kommander.mesosphere.io/v1alpha1 kommander.mesosphere.io/v1beta1 workspaces.kommander.mesosphere.io/v1alpha1
Notice that there is a mismatch; the apiVersion that the cluster supports is kommander.mesosphere.io/v1beta1 but the license specified kommander.mesosphere.io/v1alpha1.
Solution
To solve this mismatch, edit the license.yaml file and change the kommander.mesosphere.io apiVersion to the one supported by your cluster.
To check if the license was added correctly, execute the following kubectl command:
> kubectl get License -n kommander NAME VALID START DATE END DATE CLUSTER CAPACITY JWT REFERENCE my-license true 2020-05-01T00:00:00Z 2024-02-01T00:00:00Z 20 my-license-secret