To deploy the AppDynamics Operator on OpenShift, open a command prompt and follow the steps below. If you are not on OpenShift, see Deploy the AppDynamics Operator on Kubernetes.

This document contains links to Red Hat OpenShift documentation. AppDynamics makes no representation as to the accuracy of Red Hat OpenShift documentation because Red Hat controls its own documentation.

  1. Ensure your oc is pointing to your Kubernetes cluster. For more details see, Get Started with the CLI in the Red Hat OpenShift documentation.

  2. Log on as a cluster administrator.

  3. Create a namespace for appdynamics in your Red Hat OpenShift cluster:

    $ oc new-project appdynamics
    CODE
  4. Verify your namespace is created by running:

    $ oc get project
    CODE

    Example output:

    NAME                                DISPLAY NAME   STATUS
    appdynamics                                        Active
    default                                            Active
    kube-public                                        Active
    kube-service-catalog                               Active
    kube-system                                        Active
    TEXT
  5. To install the latest version of the AppDynamics Operator for Red Hat OpenShift

    $ oc create -f cluster-agent-operator-openshift.yaml
    CODE

    The AppDynamics Operator creates a Custom Resource Definition, which extends the Kubernetes APIs to create a new Kubernetes type called clusteragents. The AppDynamics Operator also creates a serviceaccount, a clusterrole, and clusterrolebinding for the namespace.

    Example output: 

    customresourcedefinition.apiextensions.k8s.io/clusteragents.appdynamics.com created
    customresourcedefinition.apiextensions.k8s.io/infravizs.appdynamics.com created
    serviceaccount/appdynamics-operator created
    serviceaccount/appdynamics-infraviz created
    podsecuritypolicy.extensions/appdynamics-infraviz created
    clusterrole.rbac.authorization.k8s.io/appdynamics-operator created
    clusterrolebinding.rbac.authorization.k8s.io/appdynamics-operator created
    clusterrolebinding.rbac.authorization.k8s.io/appdynamics-infraviz created
    role.rbac.authorization.k8s.io/appdynamics-infraviz created
    rolebinding.rbac.authorization.k8s.io/appdynamics-infraviz created
    deployment.apps/appdynamics-operator created
    CODE
  6. Verify that the AppDynamics Operator is running:

    oc -n appdynamics get pods
    CODE

    Example output:

    NAME									READY		STATUS		RESTARTS	AGE
    appdynamics-operator-95ffb549c-m8tjv	1/1			Running		0			30s
    CODE

    This output shows that OpenShift extends the custom resource definitions that you provided.  Now you are ready to Build the Cluster Agent Container Image.

  7. Create a secret with the Controller access key:

    oc -n appdynamics create secret generic cluster-agent-secret \
    --from-literal=controller-key="<controller-access-key>" \
    CODE