OBLYTECH Logo
OBLYTECH Logo

Kubernetes Observability Setup

Kubernetes observability in ServiceNow starts with reliable discovery of clusters, workloads, pods, and containers, followed by checks that their CMDB relationships reflect the running environment. Use Kubernetes Visibility Agent for continuous resource discovery or Kubernetes patterns for scheduled collection. Then validate topology, change reporting, and retirement behavior before expanding coverage.

Define the Kubernetes observability scope in ServiceNow

Begin with a cluster that has a known application owner and a deployment you can change during testing. Record its cluster name, namespaces, workload controllers, services, and expected container images. This becomes your acceptance sample: a discovered cluster record alone does not demonstrate that responders can follow a workload down to its containers.

Kubernetes Visibility Agent detects resource changes and updates the CMDB continuously. Kubernetes patterns discover components and support application services containing those components; the Kubernetes Event pattern also discovers Kubernetes events. Choose the collection approach against the operational question you need to answer, such as which workload changed or which service depends on a containerized application.

Keep resource inventory acceptance separate from performance monitoring acceptance. A relationship showing that a pod contains a container does not establish application response time or explain a failed request. Define the evidence needed for each operational question before treating the discovered topology as a complete view of service health.

Record installed application and Informer versions alongside the instance release, and check these settings on your instance before rollout. For the collection-specific workflow, see Kubernetes discovery with Visibility Agent.

Install the Informer with an identifiable cluster name

The Kubernetes Visibility Agent Informer can be installed through a Helm chart or the supplied Kubernetes YAML file. Installing the Informer requires no ServiceNow role. Arrange cluster deployment access with the Kubernetes administrator rather than assuming that this removes Kubernetes access requirements.

  1. Choose the namespace and identify the destination instance. Keep the cluster name consistent with its CMDB identity so the acceptance sample remains traceable.
  2. For Helm, set acceptEula=Y, instance.name, and clusterName using the appropriate deployment values. Have the responsible person review the license before accepting it.
  3. For YAML, set ACCEPT_EULA to Y, replace the namespace and instance placeholders, and set the cluster name to its CMDB name. The instance placeholder takes the instance name without its domain.
  4. For an OpenShift installation, set openShift=true in Helm or OPENSHIFT to true in YAML.
  5. Apply the deployment, then check whether the expected cluster resources begin appearing in the destination instance.

Where node taints prevent scheduling, supply tolerations through a YAML file passed with the Helm tolerations parameter. Diagnose an unscheduled Informer before investigating missing CMDB relationships: a collector that cannot run cannot demonstrate successful discovery.

Choose initial collection settings deliberately. Full discovery frequency, continuous discovery, memory requests, and memory limits are configurable. Test the chosen configuration against the sample cluster’s rate of change before carrying it across a fleet. Document who owns the configuration and who investigates a collection interruption.

Check the relationship chain from cluster to container

Validate relationships as well as CI counts. KVA creates relationships between a cluster and its nodes, pods, services, ingresses, and namespaces. It also connects namespaces to workloads and connects workload controllers to the pods they instantiate. These relationships give an operator a route through the discovered resources.

Start with a known deployment and inspect the corresponding namespace, controller, pod, image, and container records. For non-init containers under the default setting, KVA creates a Contains::Contained by relationship from the Kubernetes Pod to the Docker Container. It also links the pod to its image and the image to its container.

  • Check that the cluster and namespace match the selected workload rather than another environment with a similar name.
  • Inspect the controller-to-pod relationship and compare the pod sample with the running workload.
  • Follow the Kubernetes Service relationship to the workload it serves, then inspect an ingress relationship where that application uses ingress.
  • Verify image and container records against the deployment sample so an inventory count does not conceal a missing relationship.

Some relationships require explicit configuration. The pod-to-node Runs on::Runs relationship uses createPodNodeRelation.enable, which defaults to false. Connection discovery also starts disabled: connectionsDiscovery.method is empty by default and accepts servicenow or cilium to enable collection. Do not interpret either missing relationship as a collection failure until you check its configuration.

For topology that crosses cluster boundaries, review bringIngressAddresses, bringNodeExternalIPs, and discoverK8sServiceExternalIps when planning hybrid maps. Decide which addresses the map needs before enabling additional collection. Broader design choices belong in the ServiceNow and Kubernetes integration guide.

Validate scheduled discovery and namespace coverage

For pattern-based discovery, establish that the MID Server can reach the Kubernetes API server. The Kubernetes identity needs GET permissions for the resource endpoints being discovered, including namespaces, pods, nodes, services, and workload controllers. Verify access with the Kubernetes administrator before treating an empty namespace as an empty application environment.

Use one credential authentication method: a username and password or a Bearer token. In a manually configured serverless discovery schedule, set Discover to Serverless, select the intended MID Server or MID Server cluster, and add the execution pattern. Keep the selected namespace scope in the test record.

Large clusters can exceed what a single execution can collect successfully. Starting with Discovery and Service Mapping Patterns version 1.35.1, Kubernetes Cluster – Per-Namespace LP discovers namespaces separately while collecting the same CI data as the standard pattern. Enable Run Child Patterns when selecting this pattern.

Check namespace permissions before switching. A ClusterRole with a ClusterRoleBinding covers namespaces across the cluster; namespace-scoped Role and RoleBinding objects need bindings in the namespaces being enumerated. Compare a known workload in each selected namespace against the CMDB result. Partial discovery should remain a failed acceptance check even when the schedule completes.

For help planning this work, see ServiceNow implementation.

Test change reporting and stale resource handling

Use a controlled workload change to test freshness. Record the starting pod and controller identities, perform the agreed change, and compare the resulting resource relationships in the instance. Check whether the intended resources changed together rather than accepting a newly created pod as proof that the entire topology is current.

For each sampled pod, record its Kubernetes UID, resource version, namespace, cluster reference, and state before and after the test. Compare the UID as well as the name so the review distinguishes a replacement pod from an update to the same record. If a namespace is missing from the results, check its discovery scope and access permissions before repeating the workload change. This gives the reviewer specific records to compare when investigating incomplete collection.

Continuous discovery can be deactivated when periodic snapshots meet the requirement. Frequent-change suppression and concurrent full-discovery controls are also available. Treat these as workload-management decisions: agree how much delay the operational team can tolerate and test the resulting behavior before reducing collection activity.

Plan cluster retirement separately from change detection. Automatic retirement is disabled by default through sn_acc_visibility.auto_retire_k8s_clusters. When enabled, retirement requires an Informer in the Down state and a cluster CI that has not been updated for the configured period. The evaluation happens during full discovery cycles.

The default inactivity period is 60 days, controlled by sn_acc_visibility.auto_retire_period_days using sys_updated_on. The default sn_acc_visibility.auto_retire_install_status value is 7, meaning Retired. A value of 100 means Absent and leads to irreversible deletion by a table cleanup job. Review that consequence before selecting a retirement status.

Keep a collection outage distinct from a confirmed decommissioning decision in the operating procedure. Name the person who checks cluster ownership before approving lifecycle settings. For the wider operational design, see ITOM observability and resilience.

Questions about extending Kubernetes visibility

Can container image scanning be added to a YAML installation?

Syft container image scanning is supported through the Helm chart installation method. The Helm setting is runSyftScanner=true. If scanning is a requirement, include the installation method in the design decision before deploying the Informer.

Does Kubernetes cost allocation follow automatically from discovery?

Cost allocation has separate cloud configuration steps before billing download. In AWS, the action requires the AWS Management Console administrator role. In Google Cloud, it requires the Google Cloud administrator role, and cost allocation must be enabled for each cluster individually.

Will retirement automatically change associated Linux server records?

The property sn_acc_visibility.node_deletion_set_server_install_status controls the status written to associated Linux server CIs when nodes are deleted or a cluster is retired. Its default is empty. If it is missing or empty, the system takes no action on those Linux server CIs.

Can the existing Informer move from Helm 3 to Helm 4?

KVA supports Helm 4. For an existing release moving from Helm 3, the upgrade uses –server-side=true to migrate to Helm 4’s Server-Side Apply model. Include that migration setting in the upgrade review rather than treating the move as an unchanged install command.

Where can operators inspect discovered Kubernetes environments?

Check dashboard access before the operator handover: Kubernetes discovery must have completed, and the installed Discovery Admin Workspace must be v1.20.0 or later. The platform requirement is Brazil, Australia, or Zurich starting with Patch 8. Viewing the dashboard requires the discovery_admin role. With those prerequisites met, open Workspaces > Discovery Admin Workspace > Insights > Kubernetes Explorer. Use the known acceptance sample to check what operators see before handing over the setup.