To deploy the AppDynamics Operator on Kubernetes, open a command prompt and follow these steps:

(If you are not on Kubernetes, see Deploy the AppDynamics Operator on Red Hat OpenShift)

This page contains links to Kubernetes documentation. AppDynamics makes no representation as to the accuracy of Kubernetes documentation because Kubernetes controls its own documentation.

  1. Ensure your kubectl is pointing to your Kubernetes cluster. See Install and Set Up kubectl in the Kubernetes documentation

  2. Log on as a cluster administrator.

  3. To create a namespace for appdynamics in your Kubernetes cluster, enter:

    $ kubectl create namespace appdynamics
    CODE
  4. To verify your namespace is created, enter:

    $ kubectl get namespace
    CODE

    Example output:

    NAME				STATUS			AGE
    appdynamics			Active			5s
    default				Active			41d
    kube-node-lease		Active			41d
    kube-public			Active			41d
    kube-system			Active			41d
    TEXT
  5. To install the latest version of the AppDynamics Operator for Kubernetes, enter:

    $ kubectl create -f cluster-agent-operator.yaml
    CODE

    For Kubernetes version that is less than or equal to 1.14, enter the following command:

    kubectl create -f cluster-agent-operator-1.14-or-less.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. To verify that the AppDynamics Operator is running, enter:

    kubectl -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 Kubernetes extends the custom resource definitions that you provided. You can now Build the Cluster Agent Container Image.