Deploy in a custom namespace

When integrating Observe into your Kubernetes cluster, the Observe Agent Helm chart typically installs into the default observe namespace. However, you might prefer to deploy it in a custom namespace, such as observability, to align with your organization’s naming conventions or to isolate observability tooling.

This topic describes the process of installing the Observe Agent into a custom namespace cleanly, ensuring all secrets, annotations, and Helm metadata are configured correctly.

Prerequisites

Before you start, make sure the following requirements are met:

  • You have installed and configured kubectl and helm with access to your cluster.
  • You have your Observe token handy.
  • The Observe Helm repository is added:
helm repo add observe https://observeinc.github.io/helm-charts
helm repo update

Install and verify

Perform the following steps to install and verify the Observe Agent:

  1. Create the target namespace you want to use. For example, to create a namespace called observability:
kubectl create namespace observability
  1. The Observe Agent needs credentials to send telemetry to your Observe instance. Create a Kubernetes secret in your custom namespace with your Observe token:
kubectl -n observability create secret generic agent-credentials \
  --from-literal=OBSERVE_TOKEN=<your_observe_token_here>
  1. Annotate and label the secret. Helm uses annotations and labels to manage the resources it deploys. To make the secret Helm-managed so it won’t get overwritten or orphaned, annotate and label the secret appropriately:
kubectl annotate secret agent-credentials -n observability \
  meta.helm.sh/release-name=observe-agent \
  meta.helm.sh/release-namespace=observe

kubectl label secret agent-credentials -n observability \
  app.kubernetes.io/managed-by=Helm
  1. Now you can install the Observe Agent into the custom namespace. The Helm chart supports namespace overrides for each internal component, so specify them all to ensure resources are created in the right place.
helm install observe-agent observe/agent -n observability \
  --set cluster.namespaceOverride.value="observability" \
  --set cluster-events.namespaceOverride="observability" \
  --set cluster-metrics.namespaceOverride="observability" \
  --set prometheus-scraper.namespaceOverride="observability" \
  --set node-logs-metrics.namespaceOverride="observability" \
  --set monitor.namespaceOverride="observability" \
  --set forwarder.namespaceOverride="observability" \
  --set observe.collectionEndpoint.value="https://<your-collector>.collect.observe-staging.com/" \
  --set cluster.name="k8s-cluster" \
  --set node.enabled="true" \
  --set application.prometheusScrape.enabled="false" \
  --set node.forwarder.enabled="true" \
  --set node.forwarder.metrics.outputFormat="otel"
📘

Note

If your Observe account is in production, replace collect.observe-staging.com with your production collector endpoint.

  1. To verify the deployment, check that all components are running under your custom namespace:
kubectl get pods -n observability

Your output should look similar to the following:

observe-agent-cluster-events-xxxxx
observe-agent-cluster-metrics-xxxxx
observe-agent-forwarder-xxxxx
observe-agent-monitor-xxxxx
observe-agent-node-logs-metrics-xxxxx
observe-agent-prometheus-scraper-xxxxx
  1. Also confirm that metrics and logs are successfully flowing into your Observe instance.

Upgrade or uninstall

Upgrades and uninstalls work the same as in the default namespace—just specify your custom namespace. For example, to upgrade or uninstall in a namespace called observability:

# Upgrade
helm upgrade observe-agent observe/agent -n observability

# Uninstall
helm uninstall observe-agent -n observability