# getKubernetesPods

> Function getKubernetesPods in pulumi-portainer.

<!-- Generated from the pulumi-portainer SDK. -->

Function getKubernetesPods in pulumi-portainer.

Invoke token: `portainer:index/getKubernetesPods:getKubernetesPods`.

## Example

Only required arguments are set. A string in angle brackets stands in for that argument. Any other value is an option or example written in the SDK description.

```ts
import * as portainer from "pulumi-portainer"

const result = await portainer.getKubernetesPods({
  environmentId: 0,
})
```

`getKubernetesPodsOutput` accepts Input values and returns `Output` of the same result.

## Arguments

| Property        | Type     | Required | Description |
| --------------- | -------- | -------- | ----------- |
| `environmentId` | `number` | yes      |             |
| `fieldSelector` | `string` | no       |             |
| `id`            | `string` | no       |             |
| `labelSelector` | `string` | no       |             |
| `namespace`     | `string` | no       |             |

## Result

| Property        | Type                     | Always present | Description |
| --------------- | ------------------------ | -------------- | ----------- |
| `environmentId` | `number`                 | yes            |             |
| `fieldSelector` | `string`                 | no             |             |
| `id`            | `string`                 | yes            |             |
| `labelSelector` | `string`                 | no             |             |
| `namespace`     | `string`                 | no             |             |
| `pods`          | `GetKubernetesPodsPod[]` | yes            |             |

## `GetKubernetesPodsPod`

Output object `GetKubernetesPodsPod`. Fields below belong to this object.

| Property         | Type                              | Always present | Description |
| ---------------- | --------------------------------- | -------------- | ----------- |
| `containers`     | `GetKubernetesPodsPodContainer[]` | no             |             |
| `hostIp`         | `string`                          | no             |             |
| `labels`         | `{ [key: string]: string }`       | no             |             |
| `name`           | `string`                          | no             |             |
| `namespace`      | `string`                          | no             |             |
| `nodeName`       | `string`                          | no             |             |
| `phase`          | `string`                          | no             |             |
| `podIp`          | `string`                          | no             |             |
| `ready`          | `boolean`                         | no             |             |
| `restartCount`   | `number`                          | no             |             |
| `serviceAccount` | `string`                          | no             |             |
| `startTime`      | `string`                          | no             |             |

## `GetKubernetesPodsPodContainer`

Output object `GetKubernetesPodsPodContainer`. Fields below belong to this object.

| Property       | Type      | Always present | Description |
| -------------- | --------- | -------------- | ----------- |
| `image`        | `string`  | no             |             |
| `name`         | `string`  | no             |             |
| `ready`        | `boolean` | no             |             |
| `restartCount` | `number`  | no             |             |
