# getKubernetesEvents

> Function getKubernetesEvents in pulumi-portainer.

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

Function getKubernetesEvents in pulumi-portainer.

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

## 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.getKubernetesEvents({
  environmentId: 0,
})
```

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

## Arguments

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

## Result

| Property        | Type                         | Always present | Description |
| --------------- | ---------------------------- | -------------- | ----------- |
| `environmentId` | `number`                     | yes            |             |
| `events`        | `GetKubernetesEventsEvent[]` | yes            |             |
| `id`            | `string`                     | yes            |             |
| `namespace`     | `string`                     | no             |             |
| `resourceId`    | `string`                     | no             |             |
| `warningCount`  | `number`                     | yes            |             |

## `GetKubernetesEventsEvent`

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

| Property         | Type     | Always present | Description |
| ---------------- | -------- | -------------- | ----------- |
| `count`          | `number` | no             |             |
| `firstTimestamp` | `string` | no             |             |
| `kind`           | `string` | no             |             |
| `lastTimestamp`  | `string` | no             |             |
| `message`        | `string` | no             |             |
| `name`           | `string` | no             |             |
| `namespace`      | `string` | no             |             |
| `reason`         | `string` | no             |             |
| `type`           | `string` | no             |             |
| `uid`            | `string` | no             |             |
