Skip to content

Update the AI Security license

Use this reference to update the license key for AI Security self-hosted deployments. The API method is recommended. If API access is unavailable, use one of the kubectl methods described below.

You can find the license key in the Custom Resource securityoperators.ai.security.f5.com. It's in the f5-ai-sec namespace within the cai-deployment pod.


You can use the PATCH /license API endpoint to update the license key. This method provides immediate validation.


Export and edit configuration file

You can also export the Custom Resource to a YAML file, update the license key, and reapply the changes.

  1. Export the Custom Resource to a YAML file:

    shell
    kubectl get securityoperators.ai.security.f5.com cai-deployment -n f5-ai-sec -o yaml > cai-deployment.yaml

    This command exports the current configuration to cai-deployment.yaml in your working directory.

  2. Open cai-deployment.yaml in a text editor.

  3. Locate CAI_MODERATOR_DEFAULT_LICENSE.

  4. Replace the existing license key.

    Make sure you include only the license key. Do not include quotes or special characters.

  5. Save the file.

  6. Apply the updated configuration:

    shell
    kubectl apply -f cai-deployment.yaml

    Kubernetes applies the updated Custom Resource to the cluster.

  7. Continue to Redeploy the pods.


Live edit in terminal

Edit the Custom Resource directly in your terminal.

  1. Open the Custom Resource in edit mode:

    shell
    kubectl edit securityoperators.ai.security.f5.com cai-deployment -n f5-ai-sec
  2. Locate the CAI_MODERATOR_DEFAULT_LICENSE parameter.

  3. Replace the existing license key value with your new license key.

    Make sure you include only the license key itself. Do not include quotes or special characters.

  4. Save and close the editor.

  5. Continue to Redeploy the pods.


Redeploy the pods

After you update the license key, restart the cai-moderator pods.

shell
kubectl rollout restart deployment -n cai-moderator cai-moderator

This command triggers a rolling restart of the cai-moderator deployment.


Verify the license update

If the license update works, make sure the application works as expected. If you encounter errors, check the pod logs:

shell
kubectl logs -n cai-moderator deployment/cai-moderator

References

For more information, see:

Updated at: