Kubernetes

Supported Versions

  • 1.14.x
  • 1.13.x
  • 1.12.x
  • 1.11.x
  • 1.10.x
  • 1.9.x
  • 1.8.x
  • 1.7.x

Kubernetes V2

Beginning with release #154 we are rolling out a new version of the Kubernetes support. See Kubernetes V2 for details.

Supported Managed Kubernetes

  • Amazon Elastic Container Service for Kubernetes (EKS): 1.10.x
  • Azure Kubernetes Service (AKS): 1.10.x
  • Google Kubernetes Engine (GKE): 1.10.x, 1.11.x, 1.12.x

Installing the Instana agent in Kubernetes

The Agent Setup Quick Start for Kubernetes describes how to install the Instana agent into your cluster in a production-ready configuration.

Sensor Data Collection

Instana collects information about the Kubernetes Cluster, Deployments, Pods, ResourceQuotas, Namespaces and Nodes.

  • Cluster

    • KPIs
    • Node Count
    • Pods Allocation (Allocated Pods / Pods Capacity ratio)
    • CPU Requests Allocation (CPU Requests / CPU Capacity ratio)
    • CPU Limits Allocation (CPU Limits / CPU Capacity ratio)
    • Memory Requests Allocation (Memory Requests / Memory Capacity ratio)
    • Memory Limits Allocation (Memory Limits / Memory Capacity ratio)
    • CPU Resources
    • CPU Requests (aggregated cpu requests of all running containers)
    • CPU Limits (aggregated cpu limits of all running containers)
    • CPU Capacity (aggregated cpu capacity of all nodes)
    • Memory Resources
    • Memory Requests (aggregated memory requests of all running containers)
    • Memory Limits (aggregated memory limits of all running containers)
    • Memory Capacity (aggregated memory capacity of all nodes)
    • Pods (aggregated on whole cluster)
    • Running Pods
    • Pending Pods
    • Allocated Pods
    • Pods Capacity
    • Replicas (aggregated from all deployments)
    • Available Replicas
    • Desired Replicas
    • Node list with KPIs
    • Deployment list with KPIs
    • Component Statuses
  • Deployment

    • Conditions
    • Labels
    • CPU Resources
    • CPU Requests (aggregated cpu requests of all running containers of this deployment)
    • CPU Limits (aggregated cpu limits of all running containers of this deployment)
    • Memory Resources
    • Memory Requests (aggregated memory requests of all running containers of this deployment)
    • Memory Limits (aggregated memory limits of all running containers of this deployment)
    • Pods
    • Available vs Desired Pods
    • Pending vs Unscheduled vs Unready Pods
    • Pending phase duration (in most cases can be interpreted as rollout duration )
  • Pod

    • KPIs
    • Phase
    • Restarts (aggregated on all containers of this pod)
    • CPU Requests (aggregated on all containers of this pod)
    • CPU Limits (aggregated on all containers of this pod)
    • Memory Requests (aggregated on all containers of this pod)
    • Memory Limits (aggregated on all containers of this pod)
    • Conditions
    • Labels
    • Container list (State, Restarts)
  • ResourceQuota

    • Hard & Used
    • CPU Requests
    • CPU Limits
    • Memory Requests
    • Memory Limits
    • Pods
  • Namespace

    • KPIs
    • CPU Requests Allocation (CPU Requests / CPU Capacity ratio)
    • CPU Limits Allocation (CPU Limits / CPU Capacity ratio)
    • Memory Requests Allocation (Memory Requests / Memory Capacity ratio)
    • Memory Limits Allocation (Memory Limits / Memory Capacity ratio)
    • Pods Allocation (Allocated Pods / Pods Capacity ratio)
    • Status
    • Deployments list
    • Deployment configs list

In order to monitor namespaces, a watch permission for namespaces and resourcequotas must be added to the ClusterRole definition. Namespace allocation metrics are calculated for every namespace taking into account current usage of resources (CPU, memory and pods) and assigned ResourceQuota. For more information regarding ResourceQuotas see official documentation.

  • Node

    • KPIs
    • Pods Allocation (Allocated Pods / Pods Capacity ratio)
    • CPU Requests Allocation (CPU Requests / CPU Capacity ratio)
    • CPU Limits Allocation (CPU Limits / CPU Capacity ratio)
    • Memory Requests Allocation (Memory Requests / Memory Capacity ratio)
    • Memory Limits Allocation (Memory Limits / Memory Capacity ratio)
    • CPU Resources
    • CPU Requests (aggregated cpu requests of all running containers on this node)
    • CPU Limits (aggregated cpu limits of all running containers on this node)
    • CPU Capacity
    • Memory Resources
    • Memory Requests (aggregated memory requests of all running containers on this node)
    • Memory Limits (aggregated memory limits of all running containers on this node)
    • Memory Capacity
    • Pods Allocation
    • Allocated Pods (running pods on this node)
    • Pods Capacity
    • Conditions
    • Labels
    • Pods list

Monitoring Kubernetes

Once the agent has been deployed to your cluster, the Kubernetes sensor will report detailed data about the cluster and the resources deployed into it.

As written above Instana automatically discovers and monitors Kubernetes

  • Clusters
  • Deployments
  • Namespaces
  • Nodes
  • Pods
  • ResourceQuotas

Finding Kubernetes

You can use Dynamic Focus to filter the data. You can for example search for a specific deployment in the cluster. Kubernetes dynamics focus filter for deployment

If you are in the Infrastructure view it will show you the corresponding host and Docker container for the deployment. As with all other queries in Dynamic Focus the filter will also work for the Application & Service Management.

Dynamic Focus also offers various options to find Kubernetes. Specific Kubernetes keywords (just the first level - select one to drill down): Kubernetes dynamic focus keywords

You can also search for the different types of entities within Kubernetes: Kubernetes dynamic focus types

Within the Infrastructure view you will see hosts or containers. If a host is also a node in Kubernetes once you click on the host you will also see the Kubernetes panel in the sidebar Kubernetes Sidebar on Host

If you click on a Docker container or navigate to it you will also see the Kubernetes panel in the sidebar with further details Kubernetes Sidebar on Docker

You also have access to the Kubernetes labels on the various levels. Here as an example the labels associated with the Docker container Kubernetes labels

Within the Kubernetes panel you can also navigate the different entities. For example you can drill deeper into a deployment. Please note that the deployment dashboard offers a variety of information and metrics about it. Including configuration, state and the kubectl command to drill deeper if you want. Kubernetes deployment

Health Rules

Built-in

There are couple of built-in health rules that will trigger an issue for Kubernetes entities

  • Cluster

    • Kubernetes reports a Master-Component (api-server, scheduler, controller manager) is unhealthy.
  • Node

    • Requested CPU is approaching max capacity (requested CPU / CPU capacity ratio is bigger than 80%).
    • Requested Memory is approaching max capacity (requested memory / memory capacity ratio is bigger than 80%).
    • Allocated pods are approaching maximum capacity (allocated pods / pods capacity ratio is bigger than 80%). For a node pods in the phases ‘Running’ and ‘Unknown’ are counted as allocated. See Kubernetes docs for details the node capacity.
    • Node reports a condition which is not ready for more than one minute. For a node that’s all conditions besides the Ready condition. See Kubernetes docs for details on all node conditions.
  • Namespace

    • Requested CPU is approaching max capacity (requested CPU / CPU capacity ratio is bigger than 80%).
    • Requested Memory is approaching max capacity (requested memory / memory capacity ratio is bigger than 80%)
    • Allocated pods are approaching maximum capacity (allocated pods / pods capacity ratio is bigger than 80%). For a namespace pods in the phases ‘Pending’, ‘Running’ and ‘Unknown’ are counted as allocated. The namespace capacity values are based of ResourceQuotas which can be set per Namespace. See Kubernetes docs for details.
  • Deployment

    • Available replicas less than desired replicas.
  • Pod

    • A pod is not ready for more than one minute, and the reason is not, that it’s completed. (PodCondition=Ready, Status=False, Reason != PodCompleted). See Kubernetes docs for details on all pod conditions.

Custom

In addition to the built-in rules you can also create custom rules on metrics of a cluster, namespace, deployment, namespace and pod. E.g. if the threshold for node capacity warnings is to high you can disable them and create a custom rule with a lower threshhold. See Events & Incidents configuration for details.