---
title: "Host Template: Application - Kubernetes - Pod"
description: ""
url: "https://docs.itrsgroup.com/docs/opsview/current/opspacks/application-kubernetes-opspack/application-kubernetes-pod-host-template/index.html"
---## Overview

Monitor your Kubernetes pod with detailed metrics.

This Host Template includes the following Service Checks:

| Service&nbsp;Check&nbsp;Name | Description | Default&nbsp;Thresholds (Metric:&nbsp;Warning,&nbsp;Critical) | UOM |
|:-----------------------------|:------------|:------------------------------------------------:|:---:|
| Kubernetes - Pod - CPU Usage | The amount of virtual CPU resources, measured in MilliCores, currently being used by the pod. | N/A | n |
| Kubernetes - Pod - Phase | High level summary of where the pod is in its lifetime; Pending, Running, Succeeded, Failed or Unknown. | N/A | N/A |
| Kubernetes - Pod - Memory Usage | The current memory usage and capacity of the pod, in bytes. | N/A | B |
| Kubernetes - Pod - Ephemeral Storage Usage | Cumulative count of bytes read and written in the ephemeral storage for this pod. | N/A | B |
| Kubernetes - Pod - Volume Usage | Cumulative count of bytes read and written in the volumes for this pod. | N/A | B |
| Kubernetes - Pod - Network Bytes | Cumulative count of bytes received and sent. | N/A | B |
| Kubernetes - Pod - Network Errors | Cumulative count of errors encountered during network usage. | N/A | N/A |


**Note**


See details about [Monitoring Plugin thresholds here](https://www.monitoring-plugins.org/doc/guidelines.html#THRESHOLDFORMAT).



## Usage Instructions

Please review the overall [Application - Kubernetes Opspack](https://docs.itrsgroup.com/docs/opsview/current/opspacks/application-kubernetes-opspack/application-kubernetes-opspack/index.html) documentation for details on prerequisites, known issues, and other necessary configurations that apply to all Host Templates in the Opspack.

### Add this Host Template

Add the **Application - Kubernetes - Pod** Host Template to your Opsview Monitor host.
If the resource you're monitoring has no hostname or public IP, then open the **Advanced** settings pane and change **Host Check Command** to **Always assumed to be UP**.


**Note**


For more information, refer to the documentation on [Adding Host Templates to Hosts](https://docs.itrsgroup.com/docs/opsview/current/host/index.html#host-templates).



### Add and configure Variables

The Service Checks in this Host Template use the following variables, and they will be added to your Opsview Monitor instance alongside the Host Template:

- [**KUBERNETES_CLUSTER_DETAILS**](#kubernetes_cluster_details)
- [**KUBERNETES_POD_NAME**](#kubernetes_pod_name)
- [**KUBERNETES_NAMESPACE**](#kubernetes_namespace)
- [**KUBERNETES_CERTIFICATES**](#ssl-certificates-kubernetes_certificates)


**Note**


For more information, refer to the documentation on [Adding Variables to Hosts](https://docs.itrsgroup.com/docs/opsview/current/adding-a-new-variable/index.html#adding-a-variable-to-a-host).



### Apply Changes

Apply Changes and the system will now be monitored:

![View Output](https://docscdn.itrsgroup.com/opsview/images/opspacks-application-kubernetes-output-application-kubernetes-pod.png)

## Additional Information

This host template requires the Opsview READ-ONLY service account to be added to your cluster.


**Note**

To access live usage metrics, you will need to install metrics-server on your cluster.


## Available Variables

### Authentication variables

This Host Template supports client authentication using bearer tokens and X509 client certificates.

#### Authentication using bearer tokens

If authenticating using bearer tokens, specify the **Kubernetes API Bearer Token** argument in the [**KUBERNETES_CLUSTER_DETAILS**](#kubernetes_cluster_details) variable.
Optionally, to enable server certificate validation, provide the **CA Certificate Path** argument in the [**KUBERNETES_CERTIFICATES**](#ssl-certificates-kubernetes_certificates) variable.

#### Authentication using X509 client certificates

If authenticating using client certificates, specify the **Client Certificate Path** and **Client Key Path** arguments in the [**KUBERNETES_CERTIFICATES**](#ssl-certificates-kubernetes_certificates) variable.
When authenticating using client certificates, server certificate validation is required. To enable this, provide the **CA Certificate Path** argument in the [**KUBERNETES_CERTIFICATES**](#ssl-certificates-kubernetes_certificates) variable.

### KUBERNETES_CLUSTER_DETAILS

The Value is not used and therefore can be set to anything. Override the arguments with your Cluster Details.
Run `kubectl config view` from your master node shell to see the API server address.
The bearer token is created when creating the Opsview read-only service account, see the 'Installing Metrics Server' section for more information.

| Plugin&nbsp;Parameter | Position&nbsp;in Variable | Name | Description |
|:---------------------:|:-------------------------:|:-----|:------------|
| N/A (Opsview UI Only) | Value | Kubernetes Cluster Details | The details for your Kubernetes cluster. |
| `--api-server-address` | Arg1 | Kubernetes API Server Address | Server address and port number of your Kubernetes API server. This will consist of `https://<api-server-ip-or-fqdn>:<port-number>` |
| `--bearer-token` | Arg2 | Kubernetes API Bearer Token | Bearer token of your READ-ONLY service account. |

### KUBERNETES_POD_NAME

The Value is not user and therefore can be set to anything. Override the argument with the name of your pod.
Run `kubectl get pods --all-namespaces` from your cluster master to see available pods.

| Plugin&nbsp;Parameter | Position&nbsp;in Variable | Name | Description |
|:---------------------:|:-------------------------:|:-----|:------------|
| N/A (Opsview UI Only) | Value | Kubernetes Pod Details | The details of your Kubernetes pod. |
| `--pod-name` | Arg1 | Kubernetes Pod Name | The name of the individual pod you wish to monitor inside your Kubernetes cluster. |

### KUBERNETES_NAMESPACE

The Value is not used and therefore can be set to anything. Override the argument with the name of your Namespace.
Run `kubectl describe namespace` from your cluster master to see available namespaces.

| Plugin&nbsp;Parameter | Position&nbsp;in Variable | Name | Description |
|:---------------------:|:-------------------------:|:-----|:------------|
| N/A (Opsview UI Only) | Value | Kubernetes Namespace Details | The details of your Kubernetes namespace. |
| `--namespace` | Arg1 | Kubernetes Namespace | The namespace you want to monitor inside your Kubernetes cluster. |

### SSL Certificates: KUBERNETES_CERTIFICATES


**Opsview Cloud**


For Opsview Cloud customers, please contact [ITRS Support](https://www.itrsgroup.com/about/contact) for assistance with setting up certificate files, as they require Orchestrator access.



Additionally, you can use the **KUBERNETES_CERTIFICATES** variable to pass in your SSL certificates for use when connecting to the service provider to gather metrics:

| Parameter | Position in Variable | Name | Description |
|:---------:|:--------------------:|:-----|:------------|
| `--ca-path` | Arg1 | CA Certificate Path | Path to the CA Certificate |
| `--client-cert` | Arg2 | Client Certificate Path | Path to the Client Certificate |
| `--client-key` | Arg3 | Client Key Path | Path to the Client Key |

## Plugin help

Plugin: `check_k8`

For mode-specific help, run the plugin with the `-h -m <mode>` flags. This will list the required and optional Variable Arguments for that mode.
The appropriate mode for each Service Check is listed here:

| Service&nbsp;Check&nbsp;Name | Mode |
|:-----------------------------|:-----|
| Kubernetes - Pod - CPU Usage | `K8.Pod.CPU` |
| Kubernetes - Pod - Phase | `K8.Pod.Phase` |
| Kubernetes - Pod - Memory Usage | `K8.Pod.Memory` |
| Kubernetes - Pod - Ephemeral Storage Usage | `K8.Pod.Storage` |
| Kubernetes - Pod - Volume Usage | `K8.Pod.Volumes` |
| Kubernetes - Pod - Network Bytes | `K8.Pod.NetworkBytes` |
| Kubernetes - Pod - Network Errors | `K8.Pod.NetworkErrors` |


