Skip to main content

Install the Agent

After you click Add System, the console displays the instructions for installing components onto the Kubernetes cluster in the styra-system namespace.

You can copy and paste the instructions from the console to run the commands in a terminal shell.

info

The command-line instructions displayed in the console are generated specifically for the Styra system you added in the above step.

To install the Styra OPA for a Kubernetes system:

  1. Configure helm (or helm3), if you are using helm as your package manager for Kubernetes applications.

  2. Configure kubectl to install the Styra OPA for the cluster to which you want to connect.

    You must copy and paste the commands into a terminal to do the following:

    • Add a label to the kube-system namespace to prevent policies from being applied to it.

    • Install the Styra OPA.

    The following output is displayed on your terminal when you install the Styra OPA.

    namespace/styra-system created
    configmap/trusted-ca-certs created
    secret/opa-server created
    configmap/opa-config created
    clusterrolebinding.rbac.authorization.k8s.io/opa-viewer created
    service/opa created
    deployment.apps/opa created
    validatingwebhookconfiguration.admissionregistration.k8s.io/
    opa-validating-webhook created
    secret/styra-access created
    configmap/datasources-agent-config created
    clusterrole.rbac.authorization.k8s.io/read-all-global created
    clusterrolebinding.rbac.authorization.k8s.io/datasources-agent-read-all created
    deployment.apps/datasources-agent created
  3. Configure kustomize if you are using kustomize to configure applications for running on the Kubernetes cluster.