---
title: KS8 Taint
slug: homologacao-atmosphere/ks8-taint
description: Learn how to mark a Node in a Kubernetes/OpenShift cluster with this comprehensive document. Explore essential parameters like state, name, taints, and replace, along with practical examples for their usage. Discover the returned values, including the obj
createdAt: 2022-12-14T19:19:53.000Z
---

## Resumo

- Marcar um Node em um cluster Kubernetes/OpenShift.

## Parâmetros

| **Parâmetro**            | **Tipo** | **Escolhas \| Valor Padrão** | **Comentários**                                         |
| ------------------------ | -------- | ---------------------------- | ------------------------------------------------------- |
| state                    | string   | - **present**<br />- absent  | O schema com versão desta representação de um objeto.   |
| name                     | string   | **                           | Namespace.                                              |
| taints                   | list     |                              | Nome do deployment.                                     |
| replace                  | bool     |                              | Se verdadeiro, permite que os taints sejam substituídos |

Utiliza parâmetros dos módulos [](https://docs.simonops.com/homologacao-atmosphere/shell)k8s auth options

## Parâmetros subcampos de taints

| **Parâmetro**            | **Tipo** | **Escolhas \| Valor Padrão** | **Comentários**                                                                            |
| ------------------------ | -------- | ---------------------------- | ------------------------------------------------------------------------------------------ |
| key                      | string   |                              | A chave taint a ser aplicada a um node                                                     |
| value                    | string   | **                           | O valor taint correspondente à chave taint.                                                |
| effect                   | string   |                              | O efeito da mancha em pods que não toleram a mancha.<br />Requerido quando o state=present |

## Exemplos

```yaml

- name: Taint node "foo"
  k8s_taint:
    state: present
    name: foo
    taints:
    - effect: NoExecute
      key: "key1"

- name: Taint node "foo"
  k8s_taint:
    state: present
    name: foo
    taints:
    - effect: NoExecute
      key: "key1"
      value: "value1"
    - effect: NoSchedule
      key: "key1"
      value: "value1"
      
- name: Remove taint from "foo".
  k8s_taint:
    state: absent
    name: foo
    taints:
    - effect: NoExecute
      key: "key1"
      value: "value1"
```

## Valores retornados

| **Chave** | **Tipo** | **Retornado quando** | **Descrição**              |
| --------- | -------- | -------------------- | -------------------------- |
| result    | complex  | sucesso              | O objeto que foi revertido |

## Valores retornados subcampos de result

| **Chave**    | **Tipo** | **Retornado quando** | **Descrição**                                                                        |
| ------------ | -------- | -------------------- | ------------------------------------------------------------------------------------ |
| api\_version | string   | sucesso              | O esquema versionado desta representação de um objeto                                |
| kind         | string   | sucesso              | O esquema versionado desta representação de um objeto                                |
| metadata     | string   | sucesso              | Metadados de objeto padrão. Inclui nome, namespace, anotações, rótulos, etc.         |
| spec         | complex  | sucesso              | Atributos específicos do objeto. Irá variar de acordo com I(api\_version) e I(kind). |
| status       | complex  | sucesso              | Detalhes do status atual do objeto                                                   |

