Deploy on Kubernetes

Prerequisites

  • Install a tool to run local Kubernetes clusters. Here, Kind is used as the default option for creating a local cluster.
  • Helm to install OpenClarity.

Deployment steps

To deploy OpenClarity to your Kubernetes cluster, complete the following steps.

  1. Create a Kubernetes cluster.

    kind create cluster --name openclarity-k8s
    
  2. Ensure the Kubernetes cluster is up and running. If you’re using kind, you can check the status of your clusters with the following command:

    kind get clusters
    
  3. Use Helm to install OpenClarity. Run the following command:

    helm install openclarity oci://ghcr.io/openclarity/charts/openclarity --version 1.1.1 \
        --namespace openclarity --create-namespace \
        --set orchestrator.provider=kubernetes \
        --set orchestrator.serviceAccount.automountServiceAccountToken=true
    
  4. Verify that all the OpenClarity pods have been successfully deployed by executing the following command:

    kubectl get pods -n openclarity
    
  5. Wait until all pods are in the Running state or have completed their initialization.

  6. Once the pods are ready, start port forwarding to access the OpenClarity gateway service. Use the following command to forward traffic from your local machine to the cluster:

    kubectl port-forward -n openclarity service/openclarity-gateway 8080:80
    
  7. Access the OpenClarity UI by navigating to http://localhost:8080/ in your web browser.

Next steps

Complete the First Tasks on the UI.

Clean up steps

  1. Uninstall OpenClarity with Helm. Run the following command:

    helm uninstall openclarity --namespace openclarity
    
  2. Delete the Kubernetes cluster.

    kind delete clusters openclarity-k8s
    
Last modified September 16, 2024: Doc imorovements (#49) (b39e4a9)