Skip to content
Release: Australia · Updated: 2026-03-23 · Official documentation · View source

Kubernetes discovery using patterns

The ServiceNow ITOM Visibility finds Kubernetes and OpenShift components using patterns and creates application services containing them. Discovery also finds Kubernetes events and frequently updates the CMDB to reflect the dynamic Kubernetes environment.

Discovery uses the Kubernetes pattern and its extension sections to discover Kubernetes components:

  • The Collect OpenShift info extension section of the Kubernetes pattern discovers the OpenShift components of the Kubernetes deployment. The OpenShift Build Config extension section is available from Store version 1.0.53.
  • The Service Mesh extension discovers service mesh details. This information enables the pattern to create service-to-service relations, shown as Connects to::Connected. Service mesh discovery requires deploying Istio on your K8s (Kubernetes) cluster. The Service Mesh extension section is available from Kubernetes extension classes. It’s supported on the ServiceNow AI Platform using the Madrid release or later.
  • The Collect Container Repository and extension section finds container registries and images in these registries.

In addition, Discovery uses the Kubernetes Event pattern to discover events for Kubernetes components.

From the 1.0.68 release on ServiceNow Store, Service Mapping can use CI relationships to add the Kubernetes components to application services during tag-based discovery.

Discovery uses the following patterns to discover the entire Kubernetes infrastructure deployed on GCP, AWS, and Azure:

  • Google Cloud Platform (GCP) – Get Kubernetes Clusters.
  • Amazon AWS Cloud - Get Kubernetes Clusters.
  • Microsoft Azure - Get Kubernetes Clusters.

These patterns query the Cloud, collect data on all Kubernetes clusters, and create a serverless schedule for each cluster. When the cluster is deleted, the schedule is marked as inactive. This feature eliminates the overhead of creating and managing multiple credentials and serverless discovery schedules per cluster. The Cloud infrastructure patterns are triggered through standard Cloud discovery.

Starting with Discovery and Service Mapping Patterns version 1.31.0, you can choose to discover Docker image CIs only, without discovering Docker container CIs. Check your entitlements to determine whether you have access to 2026 Container Packaging. For more information, see Disable Docker container CI discovery.

Supported versions

The patterns have been validated with the following Kubernetes and Red Hat OpenShift versions:

Platform/patternValidated version
On-Premises Kubernetes1.34
Google Kubernetes Engine (GKE)1.34
Azure Kubernetes Engine (AKS)1.34
Amazon Elastic Kubernetes Service (EKS)1.34
Kubernetes Event patterns1.34
OpenShift4.19.20

Request apps on the Store

Visit the ServiceNow Store to view all the available apps, and for information about submitting requests to the store. For cumulative release notes information for all released apps, see the ServiceNow Store version history release notes.

Prerequisites

Note: For prerequisites for Kubernetes Cloud infrastructure discovery, see below.

Note: Running automatic serverless Kubernetes schedules fetches the Bearer token. Adding credentials is unnecessary.

Perform the following steps so that Discovery can use the pattern to successfully find Kubernetes.

  1. Deploy the latest Discovery and Service Mapping Patterns application from ServiceNow Store.
  2. On the Kubernetes platform, find the parameters to set up Kubernetes discovery:

    • Find the URL of the kubeapi server:

      1. On the Kubernetes platform, run the following command:

        kubectl cluster-info

      2. In the output, find the line that states the URL of the kubeapi server. For example, Kubernetes control plane is running at

        https://10.154.144.146:443

    • Find the namespaces of the kubeapi server:

      1. On the Kubernetes platform, run this command:

        kubectl get namespaces

      2. In the output, find the line that states the namespaces. For example, kube-system.

        • Find the Kubernetes username and password:
      3. On the Kubernetes platform, run this command:

        kubectl config view

      4. In the output, find the username and password.

Image omitted: kubernetes-username-password.png
Locate the lines that contain information on password and username.
        **Note:** If in a certain environment, `kubectl config view` command is not showing the expected details, use the `supported` command from the Kubernetes admin to fetch the user name and password details.

-   Find the valid Bearer token with the proper permissions:
    -   If you know the default token name, use the command in the following format: `kubectl describe secret <default-token-token name>`.

        For example: `kubectl describe secret default-token-g6pwc`.

    -   If you don't know the default token name, use the command: `kubectl describe secret`.
  1. Verify that the API Server is reachable from the MID Server for successful Kubernetes discovery.
  2. Verify that the user configured on the Kubernetes platform has GET permissions to run the following /api/v1 elements:
    • https://<url>/api/v1/namespaces/
    • https://<url>/api/v1/namespaces/<namespace>
    • https://<url>/api/v1/namespaces/kube-system/endpoints/kube-controller-manager
    • https://<url>/api/v1/services
    • https://<url>/api/v1/pods
    • https://<url>/api/v1/nodes
    • https://<url>/api/v1/replicationcontrollers
    • https://<url>/apis/networking.k8s.io/v1/ingresses
    • https://<url>/apis/apps/v1/deployments
    • https://<url>/apis/apps/v1/statefulsets
    • https://<url>/apis/apps/v1/daemonsets
    • https://<url>/apis/apps/v1/replicasets
    • https://<url>/apis/batch/v1/cronjobs
    • https://<url>/apis/batch/v1/jobs
  3. To discover the OpenShift components of the Kubernetes deployment, verify that the user configured on the Kubernetes platform has GET permissions to run the following /api/v1 elements:

    • /apis/apps.openshift.io/v1/deploymentconfigs
    • ​/apis/build.openshift.io/v1/buildconfigs​
    • /apis/route.openshift.io/v1/routes​
    • /apis/user.openshift.io/v1/groups​
    • /apis/user.openshift.io/v1/users​
    • /apis/project.openshift.io/v1/projects​
    • /apis/image.openshift.io/v1/images​
    • /apis/image.openshift.io/v1/imagestreams To discover service mesh information:

    • Deploy Istio on your K8s cluster.

    • Provide the Prometheus URL.
    • Configure Prometheus to scrape metrics from Istio.
    • Activate Get Kubernetes Config Files extension to:

    • Discover configuration files.

    • Create tracked configuration files.
    • Map the configuration files workloads and services with a relationship. Note: Tracked files content is in the JSON format from version 1.0.92. Tracked files content is in YAML format in version 1.0.91 and earlier.
  4. Create the Kubernetes credentials on the ServiceNow platform:

    1. On the ServiceNow AI Platform, navigate to All > Discovery > Credentials.
    2. Select New.
    3. Select Kubernetes Credentials.
    4. On the form, fill in the fields.
FieldDescription
NameUnique and descriptive name for this credential.
User nameUser name associated with this credential. Leading or trailing spaces should be avoided; if any are detected, a warning will appear. Only one authentication method should be used: either a user name and password or a Bearer token. Don't use both.
PasswordPassword associated with this credential. Only one authentication method should be used: either a user name and password or a Bearer token. Don't use both.
Bearer Token AuthenticationThis option enables advanced authentication using a Bearer token. When the check box is selected, the Bearer Token field is displayed.
Bearer TokenDiscovery uses the Bearer token for advanced authentication when accessing Kubernetes. The Bearer token should be in BASE64 encoded format, using the character sequence as the token. For example: 31ada4fd-adec-460c-809a-9e56ceb75269. Only one authentication method should be used: either a user name and password or a Bearer token. Don't use both.
Credential alias

An alias is configured to use the Kubernetes credential for devices and applications other than Kubernetes. This alias is also used when defining a serverless discovery schedule for discovering the Kubernetes deployment.1. Select the padlock icon, and then select the search icon. 2. On the Connection & Credential Aliases form, select New. 3. Specify a name for the credential alias record. 4. Define attributes for the alias. Set the Type to Credential. 5. Select and hold (or right-click) the form header and select Save, then select Update. 6. On the Connection & Credential Aliases form, select the newly added alias.

The alias appears in the Credential alias field.

5.  On the Kubernetes credentials form, select **Update**.
  1. Create a serverless discovery schedule for the Kubernetes pattern.

    Create and define the serverless execution pattern as described in the product documentation. Configure the parameters required by the Kubernetes pattern as follows:

FieldDescription
urlThe identifier for the hostname, IP, or FQDN and the port of the Kubernetes apiserver. Use the following format: example\_hostname:example\_port or xample\_ip:example\_port. Provide the correct protocol \(HTTP or HTTPS\) in the URL.
namespaceThe namespaces that the system passes in the Kubernetes Discovery Configuration. Enter one of the following values:- Individual namespace: enter the namespace and then "kube-system". For example: `dev,kube-system` - The default value: enter `default, kube-system` - Multipile namespaces: enter the namespaces, use a comma \(,\) to separate the values, and then enter "kube-system". For example: `automation,application,test,kube-system` - All namespaces: Use an asterisk \(\*\) to enter all namespaces
credentials aliasThe alias associated with the previously created Kubernetes credentials.
cluster nameThe name of the Kubernetes cluster, in the following format: <serviceaccountid><space><clustername>.
providerThe cloud provider: GCP or AWS or Azure.
cluster\_resource\_idCluster resource ID example:- Azure Kubernetes clusters- Resource ID. - AWS- cluster ARN. - GCP- cluster global name.
  1. Create a serverless discovery schedule for the Kubernetes Event pattern. Configure the schedule to run every 5 or 10 minutes.

    Note: When the pattern is run for the first time, it stores an event_timestamp. Later on it collects only the delta events based on the timestamp. The more often the pattern is run, the fewer updates to the CMDB IRE are needed.

    Create a serverless execution pattern for the discovery schedule and assign it to the Kubernetes Events pattern. Configure the parameters required by the Kubernetes pattern as described in Configuring execution pattern attributes.

  2. To include discovered components into service instances, enable CI relationships used in tag-based discovery by Service Mapping. These CI relationships are available from the 1.0.68 release on the ServiceNow Store. For operational steps, see Tag-based discovery configuration.

Prerequisites for Kubernetes Cloud infrastructure discovery

For the Google Cloud Platform (GCP) – Get Kubernetes Clusters pattern, perform the following:

  1. In the ServiceNow instance, set up a Google Cloud Platform (GCP) service account with valid credentials and permissions.
  2. On the GCP infrastructure, set up the MID Server with full access to all Cloud APIs: Set Cloud API access scopes to "Allow full access to all Cloud APIs". The MID Server instance can access only the Clusters specific to the project.
  3. Navigate to sys_properties.list and configure the following properties:

    • sn_itom_pattern.k8s_midserver: Specify a valid MID Server name.
    • sn_itom_pattern.k8s_create_schedule_enabled: Set the value to true.

      Note: Enabling the sn_itom_pattern.k8s_create_schedule_enabled property automatically creates a serverless schedule for your cloud clusters, eliminating the need for manual scheduling. If you have an existing manual schedule and want to convert it to an automatic one, enable the property. Your manual schedule will be updated; no additional schedule will be created.

  4. Create and run Google Cloud Discovery

    Note:

    To fetch the Bearer token, while running GKE Kubernetes schedule, use the gcloud command:

    gcloud config config-helper --format="value(credential.access_token)"

    Configuring gcloud in the MID Server instance grants access to the GKE cluster to fetch the token.

For the Amazon Elastic Kubernetes Service (EKS) cluster discovery, perform the following:

  1. In the ServiceNow instance, set an AWS service account with valid management account credentials and permissions.

    1. Verify that the Amazon Elastic Kubernetes Service (EKS) Cluster has a cluster role with the read-only access to all resources.
    2. Create cluster role binding between the cluster role and a Kubernetes user. For example, read-onlyuser.
    3. Create an AWS IAM role with the policy EKSReadOnly.
    4. Associate the IAM role with the Kubernetes user in one of the following ways:
      • In the cluster, edit the aws-auth ConfigMap.
      • Run the command:

        eksctl create iamidentitymapping --cluster yourClusterName --arnarn:aws:iam::yourAccountID:role/yourIAMRoleName --username read-only-user

  2. Run Amazon Elastic Kubernetes Service (EKS) cluster discovery in one of two ways: Using the AWS Command Line Interface (CLI) or without using the AWS CLI. First, set the system property sn_itom_pattern.k8s_aws_cli_to_generate_token to use the model you choose. This system property is set to true by default.

    • Set this system property to true to use AWS CLI to generate a token.

    • Set this system property to false to use Assume Roles to generate a token.

    • Run Amazon Elastic Kubernetes Service (EKS) cluster discovery using AWS CLI:

      1. Set up the MID Server with the AWS CLI configured. Configuring AWS CLI credentials grants access to the Amazon Elastic Kubernetes Service (EKS) cluster.

        Note: The user logged in to the system must be the same as the MID Server user.

      2. To generate the Bearer token, While running the Amazon Elastic Kubernetes Service (EKS) schedule, use the AWS CLI command:aws eks get-token --cluster-name <cluster_name>.

        Configuring the AWS CLI user/role in the MID Server instance grants access to the Amazon Elastic Kubernetes Service (EKS) cluster to generate the token.

    • Run Amazon Elastic Kubernetes Service (EKS) cluster discovery without using AWS CLI:

      Note:

      This feature is supported from Discovery and Service Mapping Patterns version 1.0.96 - December 2022.

      Refer to the following KB for detailed instructions: KB1182188: EKS cluster discovery using STS AssumeRoles (Without AWS CLI)

  3. Navigate to sys_properties.list and configure the following properties:

    • sn_itom_pattern.k8s_midserver: Specify a valid MID Server name.
    • sn_itom_pattern.k8s_create_schedule_enabled: Set the value to true.

      Note: Enabling the sn_itom_pattern.k8s_create_schedule_enabled property automatically creates a serverless schedule for your cloud clusters, eliminating the need for manual scheduling. If you have an existing manual schedule and want to convert it to an automatic one, enable the property. Your manual schedule will be updated; no additional schedule will be created.

  4. Create and run an AWS Cloud Discovery schedule.

For Microsoft Azure Kubernetes Services (AKS)- Kubernetes cluster discovery, perform the following:

  1. Update to the latest Discovery and Service Mapping Patterns version.
  2. In the ServiceNow instance, configure the Azure Service Account with valid Azure credentials and permission.
  3. Navigate to sys_properties.list and configure the following properties:

    • sn_itom_pattern.k8s_midserver: Specify a valid MID Server name.
    • sn_itom_pattern.k8s_create_schedule_enabled: Set the value to true.

      Note: Enabling the sn_itom_pattern.k8s_create_schedule_enabled property automatically creates a serverless schedule for your cloud clusters, eliminating the need for manual scheduling. If you have an existing manual schedule and want to convert it to an automatic one, enable the property. Your manual schedule will be updated; no additional schedule will be created.

      .

  4. If you don't have local accounts with Kubernetes RBAC and want to improve pattern efficiency, navigate to MID Server > Properties and set the sn_itom_pattern.aks_fetch_local_ad_token property to false.

  5. Run an Azure cloud discovery schedule.
  6. Configure the MID Server in the Discovery schedules according to the cluster account type. If you don't have Local accounts with RBAC, you can ignore this step.
Cluster account typeDiscovery schedule MID Server
MS Entra ID auth with Kubernetes RBAC.Any MID Server.
MS Entra ID authentication with Azure RBAC.Any MID Server.
Local accounts with Kubernetes RBAC.Select the MID Server with the Azure Command Line Interface \(CLI\) configured. Configuring the Azure CLI credentials grants access to the AKS cluster. To fetch the Bearer token while running the AKS Kubernetes schedule, use the Azure CLI command: `az aks get-credentials --name --overwrite-existing --resource-group --file -`.
**Note:**

-   The user logged in to the system must be the same as the MID Server user.
-   For detailed information about AKS Cluster Discovery configuration, see the [AKS Cluster Discovery Configuration Details \[KB1220553\]](https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB1220553) article in the Now Support Knowledge Base.
 Property nameProperty descriptionTypeDefault value
 sn\_itom\_pattern.manifest\_digest\_image\_id Boolean

false

Note: Before setting this property to true and running discovery: avoid duplicate records from being created by deleting all Docker image records.

 sn\_itom\_pattern.k8s\_create\_schedule\_enabledThe feature flag that can be enabled/disabled under the system properties, which is responsible to control the pattern execution. When enabled, it creates discovery schedules despite the new property value.Booleanfalse
 sn\_itom\_k8s\_run\_cloud\_discoveryWhen enabled, this property executes cloud Kubernetes patterns, discovering Kubernetes clusters without creating auto schedules.Booleanfalse
MID Serversn\_itom\_pattern.k8s\_midserver\[Default\] Example- Valid MID Server nameString 
sn\_itom\_pattern.k8s\_<service\_account\_id>\_midserver\[Based on Service Account Level\] Example- Valid MID Server nameString 
sn\_itom\_pattern.k8s\_<service\_account\_id>\_<clustername>\_midserver\[Based on Cluster name\] Example- Valid MID Server nameString 
sn\_itom\_pattern.kubernetes\_collect\_volumeWhen the property is set to True, the data for Kubernetes Volume [cmdb_ci_kubernetes_volume] gets populated.Stringfalse
sn\_itom\_pattern.k8s\_add\_workload\_to\_image\_relationStarting from Discovery and Service Mapping Patterns version 1.30.2, the Kubernetes patterns create an indirect-only relationship between Docker Image and workload CIs through Kubernetes Pods. Setting the property to true also creates direct relationships between Docker Image and the following workload CI types: Deployment, DaemonSet, ReplicaSet, StatefulSet, and ReplicationController.Booleanfalse
Credential Aliassn\_itom\_pattern.k8s\_ cred\_alias\[Default\] Example- credential alias nameString 
sn\_itom\_pattern.k8s\_<service\_account\_id>\_alias\[Based on Service Account Level\] Example- Valid credential alias name.String 
sn\_itom\_pattern.k8s\_<service\_account\_id>\_<clustername>\_alias\[Based on Cluster name\] Example- Valid credential alias name.String 
Prometheus Urlsn\_itom\_pattern.k8s\_ prometheusUrl\[Default\] Example- Valid Prometheus UrlString 
sn\_itom\_pattern.k8s\_<service\_account\_id>\_prometheusUrl\[Based on Service Account Level\] Example- Valid Prometheus UrlString 
sn\_itom\_pattern.k8s\_<service\_account\_id>\_<clustername>\_prometheusUrl\[Based on Cluster name\] Example- Valid Prometheus URLString 
 sn\_itom\_pattern.k8s\_ run\[Supported Discovery Schedule run- Daily, On Demand, Weekdays, Weekends, Month Last Day, Calendar Quarter End\] Example- DailyString 
 sn\_itom\_pattern.k8s\_batch\_count\[Refers how many schedules to run in batch – default set to 5\] Example- 5 \(Number of schedules to run in on batch\)Integer5
 sn\_itom\_pattern.k8s\_schedule\_batch\_delay\[keeps tracks of the time difference between two batches value contains in sec\] Example- 300 \(in seconds\)Integer 
 sn\_itom\_pattern.k8s\_run\_time\[keeps tracks of the current time for a batch\] If this property is set, then you can use the same or you can use the dynamic timing, which will be 5 min after the system current timing. Values contains in HH:MM:SS format Example- 10:11:12 \(HH:MM:SS \)String 
 sn\_itom\_pattern.bring\_discovery\_containerStarting with Discovery and Service Mapping Patterns version 1.31.0, the property controls whether the Kubernetes, Kubernetes Event, Docker Pattern, and Amazon AWS - ECS patterns discover both Docker container and Docker image CIs or only Docker image CIs. Check your entitlements to determine whether you have access to 2026 Container Packaging.Booleantrue

Note: <service_account_id> is the account ID name under Cloud Service Accounts. For more information, see: Create Discovery schedules for cloud resources

Kubernetes Credential-less or mid-in-cluster discovery

Prerequisites for Kubernetes Credentials-less discovery:

Deploy the containerized MID Server to the Kubernetes cluster. Configuring Kubernetes credentials is unnecessary since the MID Server in Kubernetes cluster automatically discovers the API server and authenticate.

FieldDescription
URLEnter any one the of following value in URL field: https://cluster Or https://kubernetes.default.svc
namespaceThe namespaces that the system passes in the Kubernetes Discovery Configuration. Enter one of the following values: - Individual namespace: enter the namespace and then "kube-system". For example: `dev,kube-system` - The default value. Enter:`default,kube-system` - Multipile namespaces: enter the namespaces, use a comma \(,\) to separate the values, and then enter "kube-system". For example: `automation,application,test,kube-system` - All namespaces: Use an asterisk \(\*\) to enter all namespaces.
cluster\_nameEnter Unique name.

Data collected by Discovery during horizontal discovery

This data is collected by the Collect Container Repository extension section.

Table and fieldDescription
Kubernetes Cluster \[cmdb\_ci\_kubernetes\_cluster\]
NameThe name of the kube-controller-manager leader.
K8s\_uidThe kube-system namespace UID \[supported versions: 1.0.92 and later\]
ip\_addressThe identifier for the host\_ip of the Kubernetes apiserver.
portThe identifier for the Kubernetes apiserver port.
namespaceThis value shows the namespaces the system passed in the Kubernetes Discovery Configuration.
event\_timestampThe timestamp of the latest event created on this Kubernetes cluster at the time of the discovery.
Kubernetes Node \[cmdb\_ci\_kubernetes\_node\]The virtual aspect of the Kubernetes node. Data relating to the physical aspect of the Kubernetes node is stored under Linux server.
nameThe name of the Kubernetes node. The format can be only the name of the machine or the full name consisting of the name and the hostname: `.`.
k8s\_uidThe identifier for the Kubernetes node UUID.
clusterThe name of the cluster that contains this resource.
operational\_statusThe operational status of the Kubernetes node.
Kubernetes Service \[cmdb\_ci\_kubernetes\_service\]
nameThe name of the Kubernetes service.
selectorA comma delimited list of the label selectors specified in the Kubernetes configuration that are used to select target pods.
namespaceThe Kubernetes namespace to which this Kubernetes service belongs.
k8s\_uidThe Kubernetes service UUID.
clusterThe name of the cluster that contains this resource.
Kubernetes Pod \[cmdb\_ci\_kubernetes\_pod\]
nameThe name of the Kubernetes pod.
k8s\_uidThe Kubernetes pod UUID.
resourceVersionThe resource version of the Kubernetes pod.
namespaceThe Kubernetes namespace to which this Kubernetes pod belongs.
clusterThe name of the cluster that contains this resource.
stateThe Kubernetes pod status: Pending, Running, Succeeded, Failed, and Unknown.
Kubernetes Cronjob \[cmdb\_ci\_kubernetes\_cronjob\]
nameThe name of the Kubernetes cronjob
namespaceThe Kubernetes namespace to which this Kubernetes pod belongs.
k8s\_uidThe Kubernetes cronjob UUID.
clusterThe name of the cluster that contains this resource.
Kubernetes Job \[cmdb\_ci\_kubernetes\_job\]
nameThe name of the Kubernetes Job
namespaceThe Kubernetes namespace to which this Kubernetes job belongs.
k8s\_uidThe Kubernetes job UUID
clusterThe name of the cluster that contains Kubernetes job.
Kubernetes Daemonset \[cmdb\_ci\_kubernetes\_daemonset\]
nameThe name of the Kubernetes daemonset.
namespaceThe Kubernetes namespace to which this Kubernetes daemonset belongs.
k8s\_uidThe Kubernetes daemonset UUID.
clusterThe name of the cluster that contains this resource.
pods\_availThe number of pods Available.
pods\_failedThe number of pods in Failed phase.
pods\_runningThe Number of pods in the Running phase.
pods\_succeededThe number of pods in the Succeeded phase.
pods\_waitingThe number of pods in the Waiting phase.
Kubernetes Ingress \[cmdb\_ci\_kubernetes\_ingress\]
nameThe name of the Kubernetes ingress
namespaceThe Kubernetes namespace to which this Kubernetes ingress belongs.
k8s\_uidThe Kubernetes ingress UID
clusterThe name of the cluster that contains this resource.
Kubernetes Deployment \[cmdb\_ci\_kubernetes\_deployment\] Kubernetes Replicaset \[cmdb\_ci\_kubernetes\_replicaset\] Kubernetes Replication controller \[cmdb\_ci\_kubernetes\_replicationcontroller\] Kubernetes Statefulset \[cmdb\_ci\_kubernetes\_statefulset\]
nameThe name of this resource
namespaceThe Kubernetes namespace to which this resource belongs.
K8s\_uidThe Kubernetes UID of this resource
clusterThe name of the cluster that contains this resource.
total\_replicasNumber of replicas in this resource
desired\_replicasThe number of replicas in desired phase
available\_replicasNumber of replicas available
unavailable\_replicasNumber of replicas in unavailable phase
updated\_replicasNumber of replicas updated
Docker Container \[cmdb\_ci\_docker\_container\]The component that runs the docker image.
container\_idThe unique identifier for the Kubernetes docker containerIn cases where duplicate records are created, deduplication tasks appear once discovery runs. For information on how to resolve these tasks, see the Making docker container identifier independent [KB1443042] article in the ServiceNow® Knowledge Base.
namespaceThe Kubernetes namespace to which this Kubernetes docker container belongs
Docker Image \[cmdb\_ci\_docker\_image\]An executable package of an application and its related software that can be instantiated by a docker container
image\_idThe identifier for the Kubernetes docker image
nameThe name of the Kubernetes docker image.
image\_urlThe URL for downloading the docker image.
namespaceThe Kubernetes namespace to which this Kubernetes docker image belongs.
Linux Server \[cmdb\_ci\_linux\_server\]The server that hosts the Kubernetes node.
nameThe name of the Linux server powering the Kubernetes node.
hostnameThe hostname of the Linux server.
osThe operating system deployed on this Linux server.
kernel\_releaseThe version of the Linux kernel operating system deployed on this Linux server.
ramThe size of RAM installed on this Linux server.
ip\_addressThe IP address of the Linux server.
cpu\_typeThe CPU architecture of the Linux server hosting the Kubernetes node.
cpu\_countThe number of CPUs on the Linux server hosting the Kubernetes node.
serial\_numberThe serial number of the Linux server hosting the Kubernetes node.
Key Value \[cmdb\_key\_value\]This configuration item contains Kubernetes labels. Labels are key/value pairs that are attached to objects, such as pods.
keyThe key of the Kubernetes pod or Kubernetes service Key Value parameter.
valueThe value of the Kubernetes pod or Kubernetes service Key Value parameter.
Kubernetes Volume \[cmdb\_ci\_kubernetes\_volume\]
k8s\_uidThe Kubernetes volume UUID.
mount\_pathThe path for accessing this Kubernetes volume.
nameThe name of the Kubernetes volume.
namespaceThe Kubernetes namespace to which this Kubernetes volume belongs.
clusterThe name of the cluster that contains this resource.
volume\_idThe ID of the Kubernetes volume.
OpenShift Deployed Configuration \[cmdb\_ci\_openshift\_dep\_conf\]​
nameThe name of the OpenShift Deployment configuration.
namespaceThe name of the namespace containing the deployment configuration.
k8s\_uidThe Kubernetes volume UUID.
urlThe URL of the OpenShift deployed configuration, available only for Kubernetes versions earlier than 1.16.
OpenShift Build Config \[cmdb\_ci\_openshift\_build\_conf\]
nameThe name of the OpenShift build configuration.
namespaceThe name of the OpenShift namespace containing the build configuration.
k8sThe Kubernetes volume UUID.
urlThe URL of the OpenShift build configuration, available only for Kubernetes versions earlier than 1.16.
OpenShift Source2Image \[cmdb\_ci\_openshift\_source\_2\_image\]
nameThe name of the OpenShift source image.
toRelated image.
parent\_idThe ID of the OpenShift source image.
OpenShift Route \[cmdb\_ci\_openshift\_route\]
nameThe name of the OpenShift route.
namespaceThe name of the namespace containing the OpenShift route.
k8s\_uidThe Kubernetes volume UUID.
urlThe URL of the OpenShift Route, available only for Kubernetes versions earlier than 1.16.
hostThe target host of the OpenShift route.
portThe target port of the OpenShift route.
OpenShift Group \[cmdb\_ci\_openshift\_group\]
nameThe name of the OpenShift Group.
k8s\_uidThe Kubernetes volume UUID.
urlThe URL of the OpenShift Group, available only for Kubernetes versions earlier than 1.16.
OpenShift User \[cmdb\_ci\_openshift\_user\]
nameThe name of the OpenShift user.
k8s\_uidThe Kubernetes volume UUID.
urlThe URL of the OpenShift user, available only for Kubernetes versions earlier than 1.16.
full\_nameThe full name of the OpenShift user.
OpenShift Project \[cmdb\_ci\_openshift\_project\]
nameThe name of the OpenShift project.
k8s\_uidThe Kubernetes volume UUID.
urlThe URL of the OpenShift Project, available only for Kubernetes versions earlier than 1.16.
OpenShift Image \[cmdb\_ci\_openshift\_images\]
nameThe name of the OpenShift Image.
k8s\_uidThe Kubernetes volume UUID.
urlThe URL of the OpenShift Image, available only for Kubernetes versions earlier than 1.16.
docker\_image\_metadata\_idThe ID of the docker image.
docker\_image\_metadata\_parent\_idThe ID of the image parent ID.
archArchitecture of the image.
sizeThe image size.
hostnameThe hostname related to the image.
OpenShift Image Stream \[cmdb\_ci\_openshift\_images\_stream\]
nameThe name of the OpenShift Image Stream.
k8s\_uidThe Kubernetes volume UUID.
urlThe URL of the OpenShift Image Stream, available only for Kubernetes versions earlier than 1.16.
namespaceThe name of the namespace containing the OpenShift image stream.
OpenShift Docker Image Repository \[cmdb\_ci\_openshift\_docker\_images\_repository\]
nameThe name of the OpenShift docker image repository.
parent\_IDThe ID of the parent system.
Namespace \[cmdb\_ci\_kubernetes\_namespace\]
nameThe name of the Kubernetes Namespace.
stateThe Kubernetes namespace phases: Active or Terminating.
Table and fieldDescription
Container Repository [cmdb_ci_container_repository]
Name [name]The name of the container repository.
Container Repository Entry [cmdb_ci_container_repository_entry]
Name [name]The name of the container repository entry.
Category [category]The category of the container repository entry.

The graphic illustrates CIs that are part of Kubernetes discovery.

Note: This Dependency Views map was simplified for clarity. Your Kubernetes deployments may contain many more CIs.

Image omitted: kubernetes-diagram.png
Relationships between Kubernetes configuration items and Kubernetes workload tables
Image omitted: openshift-diagram.png
Namespace contains OpenShift configuration items

CI relationships collected by the Kubernetes pattern

These relationships are created by Kubernetes pattern:

CIRelationshipCI
Kubernetes Cluster \[cmdb\_ci\_kubernetes\_cluster\]Contains::Contained ByKubernetes Service \[cmdb\_ci\_kubernetes\_service\]
Contains::Contained ByKubernetes Pod \[cmdb\_ci\_kubernetes\_pod\]
Contains::Contained ByKubernetes Ingress \[cmdb\_ci\_kubernetes\_ingress\]
Contains::Contained ByKubernetes Namespace \[cmdb\_ci\_kubernetes\_namespace\]
Contains::Contained By\[cmdb\_ci\_openshift\_source\_2\_image\]
Contains::Contained ByOpenShift Group \[cmdb\_ci\_openshift\_group\]
Contains::Contained ByOpenShift User \[cmdb\_ci\_openshift\_user\]
Contains::Contained ByOpenShift Project \[cmdb\_ci\_openshift\_project\]
Contains::Contained ByOpenShift Image \[cmdb\_ci\_openshift\_images\]
Contains::Contained ByOpenShift Docker Image Repository \[cmdb\_ci\_openshift\_docker\_images\_repository\]
Cluster of::ClusterKubernetes Node \[cmdb\_ci\_kubernetes\_node\]
Manages::Managed byLinux Server \[cmdb\_ci\_linux\_server\]
Contained by::ContainsResource Group \[cmdb\_ci\_resource\_group\]
Kubernetes Pod \[cmdb\_ci\_kubernetes\_pod\]Contains::Contained ByDocker Container \[cmdb\_ci\_docker\_container\]
Contains::Contained ByDocker Image \[cmdb\_ci\_docker\_image\]
Contains::Contained ByKubernetes Volume \[cmdb\_ci\_kubernetes\_volume\]
Kubernetes Workload \[cmdb\_ci\_kubernetes\_workload\]Hosted on::HostsKubernetes Cluster \[cmdb\_ci\_kubernetes\_cluster\]
Kubernetes Service \[cmdb\_ci\_kubernetes\_service\]Provides::Provided ByKubernetes Workload \[cmdb\_ci\_kubernetes\_workload\]
Kubernetes Deployment \[cmdb\_ci\_kubernetes\_deployment\]Owns::Owned ByKubernetes Replicaset \[cmdb\_ci\_kubernetes\_replicaset\]
Kubernetes Replicaset \[cmdb\_ci\_kubernetes\_replicaset\]iInstantiates:: Instantiated ByKubernetes Pod \[cmdb\_ci\_kubernetes\_pod\]
Kubernetes Workload \[cmdb\_ci\_kubernetes\_workload\]Provided By::Provides ToKubernetes Service \[cmdb\_ci\_kubernetes\_service\]
Kubernetes Deployment \[cmdb\_ci\_kubernetes\_deployment\]Hosted on::HostsKubernetes Cluster \[cmdb\_ci\_kubernetes\_cluster\]
Kubernetes Daemonset \[cmdb\_ci\_kubernetes\_daemonset\]Hosted on::HostsKubernetes Cluster \[cmdb\_ci\_kubernetes\_cluster\]
Kubernetes Statefulset \[cmdb\_ci\_kubernetes\_statefulset\]Hosted on::HostsKubernetes Cluster \[cmdb\_ci\_kubernetes\_cluster\]
Kubernetes Namespace \[cmdb\_ci\_kubernetes\_namespace\]​Contains::Contained ByOpenShift Deployed Config \[cmdb\_ci\_openshift\_dep\_conf​\]
Contains::Contained ByOpenShift Build Config \[cmdb\_ci\_openshift\_build\_conf\]
Contains::Contained ByOpenShift Route \[cmdb\_ci\_openshift\_route\]
Contains::Contained ByOpenShift Image Stream \[cmdb\_ci\_openshift\_images\_stream\]
Docker Image \[cmdb\_ci\_docker\_image\]Instantiates::Instantiated byDocker Container \[cmdb\_ci\_docker\_container\]
Linux Server \[cmdb\_ci\_linux\_server\]Contains::Contained ByKubernetes Pod \[cmdb\_ci\_kubernetes\_pod\]
Runs::Runs onDocker Container \[cmdb\_ci\_docker\_container\]
Hosts::Hosted onKubernetes Node \[cmdb\_ci\_kubernetes\_node\]
OpenShift Deploy Config \[cmdb\_ci\_openshift\_dep\_conf​\]Contains::Contained By\[cmdb\_ci\_config\_file\_tracked​\]

The Collect Container Repository extension section of the Kubernetes pattern identifies these relationships.

CIRelationshipCI
Docker Image [cmdb_ci_docker_image]Provisioned From::ProvisionedContainer Repository Entry [cmdb_ci_container_repository_entry]
Container Repository Entry [cmdb_ci_container_repository_entry]Hosted on::HostsContainer Repository [cmdb_ci_container_repository]

CI relationships collected by the Istio Service Mesh extension

Prerequisites for Istio Service Mesh extension:

  • Ensure that Istio Service Mesh and Prometheus components are configured on the Kubernetes cluster.
  • Ensure that Prometheus discovers the service connection information using the queryistio_requests_total command.
  • Ensure that the application services are connected, and verify service-to-service traffic flow in Kiali graph.

For more information on the Bookinfo application, see: https://istio.io/latest/docs/examples/bookinfo/

CIRelationshipCI
Kubernetes Service [cmdb_ci_kubernetes_servi ce]Connects to::Connected byKubernetes Service [cmdb_ci_kubernetes_servi ce]

CI relationships collected by the Kubernetes Event pattern

These relationships are created to support the Kubernetes event discovery:

CIRelationshipCI
Kubernetes Cluster \[cmdb\_ci\_kubernetes\_cluster\]Contains::Contained ByKubernetes Service \[cmdb\_ci\_kubernetes\_service\]
Contains::Contained ByKubernetes Pod \[cmdb\_ci\_kubernetes\_pod\]
Cluster of::ClusterKubernetes Node \[cmdb\_ci\_kubernetes\_node\]
Manages::Managed by\[cmdb\_ci\_linux\_server\]
Kubernetes Pod \[cmdb\_ci\_kubernetes\_pod\]Contains::Contained ByDocker Container \[cmdb\_ci\_docker\_container\]
Contains::Contained ByDocker Image \[cmdb\_ci\_docker\_image\]
Contains::Contained ByKubernetes Volume \[cmdb\_ci\_kubernetes\_volume\]
Docker Image \[cmdb\_ci\_docker\_image\]Instantiates::Instantiated byDocker Container \[cmdb\_ci\_docker\_container\]
Linux Server \[cmdb\_ci\_linux\_server\]Contains::Contained ByKubernetes Pod \[cmdb\_ci\_kubernetes\_pod\]
Runs::Runs onDocker Container \[cmdb\_ci\_docker\_container\]
Hosts::Hosted onKubernetes Node \[cmdb\_ci\_kubernetes\_node\]

Data collected by Service Mapping during tag-based discovery

Service Mapping uses tag-based discovery to create application service maps including the Kubernetes components. Service Mapping comes with the following preconfigured CI relationships used for tag-based discovery. These CI relationships are available from the 1.0.68 release on ServiceNow Store.

CIRelationshipCI
Kubernetes Service [cmdb_ci_kubernetes_service]Contained By::ContainsKubernetes Cluster [cmdb_ci_kubernetes_cluster]
OpenShift Project [cmdb_ci_openshift_project]Contained by::ContainsKubernetes Cluster [cmdb_ci_kubernetes_cluster]
Kubernetes Pod [cmdb_ci_kubernetes_pod]Contained by::ContainsKubernetes Cluster [cmdb_ci_kubernetes_cluster]
Kubernetes Pod [cmdb_ci_kubernetes_pod]Cluster::Cluster ofKubernetes Service [cmdb_ci_kubernetes_service]
Kubernetes Namespace [cmdb_ci_kubernetes_namespace]​Contains::Contained ByOpenShift Deployed Config [cmdb_ci_openshift_dep_conf​]
Kubernetes Namespace [cmdb_ci_kubernetes_namespace]​Contains::Contained ByOpenShift Build Config [cmdb_ci_openshift_build_conf]
Kubernetes Namespace [cmdb_ci_kubernetes_namespace]​Contains::Contained ByOpenShift Route [cmdb_ci_openshift_route]
Kubernetes Namespace [cmdb_ci_kubernetes_namespace]​Contains::Contained ByOpenShift Image Stream [cmdb_ci_openshift_images_stream]

Kubernetes dashboard

After Discovery finishes discovering components of the Kubernetes deployment, you can navigate to Workspaces > Discovery Admin Workspace > Insights and use the Kubernetes Explorer dashboard to view the Kubernetes environments and resources of your organization. To use the enhanced Kubernetes dashboard, verify you have Discovery Admin Workspace starting from version 1.3.1 (August 2024 Store). For more information about Kubernetes Explorer, see Kubernetes Explorer.

Troubleshooting

If the mapping process does not proceed as you expected, follow the following suggestions.

SymptomCauseSolution
Discovery fails. The discovery message contains the information about an error caused by the REST timeout.There are many CIs sending the REST call response in the deployment. The MID Server cannot process the REST call response without exceeding the time limit controlled by the mid.sa.cloud.request_timeout parameter.

By default, the mid.sa.cloud.request_timeout parameter is set to 30000 milliseconds. Increase the value of this parameter on the relevant MID Server and run discovery again.

Note: If the Configuration Parameters related list for the relevant MID Server does not show this parameter, you may need to add it.

Pattern Designer fails during a debug session. The Pattern Designer message contains information about an error caused by a timeout.The Pattern Designer fails because of a timeout during pattern debugging \(and not during discovery\).By default, the sa.debugger.max_timeoutparameter is set to 240 seconds.Increase the value of this parameter on the relevant MID Server.

To run the Kubernetes pattern in Debug mode, refer to KB0832567 for operational information.

  • Container image scanning for software decomposition
    The ITOM Visibility apps, Discovery and Service Mapping Patterns and Kubernetes Visibility Agent integrate with Aqua Trivy to collect data on container images and OS packages. You can increase your control over container deployment by having visibility to the container components.

Parent Topic:Discovery for containerized resources

sndocs is an independent community mirror and is not affiliated with or endorsed by ServiceNow.

ServiceNow, the ServiceNow logo, Now, and other ServiceNow marks are trademarks and/or registered trademarks of ServiceNow, Inc., in the United States and/or other countries. Other company and product names may be trademarks of the respective companies with which they are associated.

© 2026 ServiceNow, Inc. All rights reserved.

Documentation content is redistributed under the Apache License 2.0 from the ServiceNowDocs repository.