Step 1: Configure the namespace

  1. Connect to a cluster and create a custom namespace.

    kubectl create ns {namespace-name} 
          
    For example- kubectl create ns monitoring

Step 2: Install the integration

  1. Navigate to Setup > Account.

  2. Click on the Integrations and Apps tile.

  3. If there are apps/integrations already installed, it will redirect to the Installed Integrations page where all the installed integrations/apps are displayed. Otherwise, the Available Integrations and Apps page is displayed.

  4. Click +ADD and search for K3s. Also you can use the All Categories dropdown list to search.

  5. Click ADD on the K3s tile.

  6. Enter the following details:

    • Name: Name for the integration.
    • Deployment type: On-prem or Cloud (AWS, GKE, and AKS)
    • Container Engine: Docker, ContainerD or CRI-O. Primarily, Docker is used (Docker is deprecated after Kubernetes v1.20). ContainerD is used for K3s integration and CRI-O is used for OKD integration by default, but based on your custom configuration, you can change their container engine when you configure the integration.

  7. Click on NEXT.

Configure Kubernetes

Step 3: Configure the integration

  1. Create a YAML file in the cluster. Example- agent.yaml

  2. Paste the copied content from the portal into a new YAML file.

  3. Replace the namespace: OpsRamp-agent to the created new namespace.

  4. Remove the section for creating namespace in the OpsRamp Agent YAML.

    apiVersion: v1
    kind: Namespace
    metadata:
      name: opsramp-agent

    Note: You must change the namespace to custom namespace (ex- monitoring) wherever namespace exists in the file and then save the file.

    kubernetes
    Example: Follow the similar ways and change the namespace as given a example for ServiceAccount namespace below:

    • ServiceAccount
    • ClusterRoleBinding
    • DaemonSet
    • Deployment
    • ConfigMap in OpsRamp Agent YAML
  5. Run the below command to apply the configuration:

    kubectl apply -f agent.yaml

  6. Now the agent is installed in your cluster.

  7. To check the status of the agent installed in the namespace, run the command below.

    kubectl get pods -n monitoring

Step 4: Check the status of namespace in OpsRmap

  1. Navigate to Infrastructure > Resources.
  2. In the lift side of the page, click on K3s to expand it.
  3. Expand the nodes and then click on container.
  4. Under Attributes, you can view the status of your newly created namespace.
    Azure Blob Storage Integration

OpsRamp Agent yaml

Default yaml we get from portalChanges that to be done to install in a different namespace
apiVersion: v1
kind: ServiceAccount
metadata:
  name: opsrampagent
  namespace: opsramp-agent
automountServiceAccountToken: true
    apiVersion: v1
    kind: ServiceAccount
    metadata:
     name: opsrampagent
     namespace: monitoring
    automountServiceAccountToken: true