{
  "name": "kubectl-cordon-node",
  "title": "Cordon or uncordon a node",
  "category": "Kubernetes",
  "tags": [
    "kubectl",
    "kubernetes"
  ],
  "version": "1.0.0",
  "date": "2026-10-18",
  "notes": "Initial release.",
  "latest": true,
  "installable": true,
  "url": "https://catalog.dagweave.com/api/v1/items/kubectl-cordon-node/1.0.0.json",
  "templateUrl": "https://catalog.dagweave.com/api/v1/items/kubectl-cordon-node/1.0.0/template.yaml",
  "entrypoint": "cordon",
  "parameters": [
    {
      "name": "node",
      "title": "Node",
      "description": "Name of the node.",
      "type": "string",
      "required": true,
      "example": "ip-10-0-3-17.eu-west-1.compute.internal"
    },
    {
      "name": "action",
      "title": "Action",
      "description": "cordon blocks new pods, uncordon allows them again.",
      "type": "string",
      "required": false,
      "default": "cordon",
      "enum": [
        "cordon",
        "uncordon"
      ]
    }
  ],
  "images": [
    {
      "ref": "cgr.dev/chainguard/kubectl@sha256:98f9c337808ecf5d5e80b79af4345762a3d8c803ebf8c857d2dddabf885107ba",
      "repository": "cgr.dev/chainguard/kubectl",
      "tag": "latest-dev",
      "digest": "sha256:98f9c337808ecf5d5e80b79af4345762a3d8c803ebf8c857d2dddabf885107ba"
    }
  ],
  "install": {
    "kubectl": "kubectl apply -n argo -f https://catalog.dagweave.com/api/v1/items/kubectl-cordon-node/1.0.0/template.yaml",
    "argo": "argo template create -n argo https://catalog.dagweave.com/api/v1/items/kubectl-cordon-node/1.0.0/template.yaml"
  },
  "template": "apiVersion: argoproj.io/v1alpha1\nkind: WorkflowTemplate\nmetadata:\n  name: kubectl-cordon-node\n  labels:\n    dagweave.io/catalog-item: kubectl-cordon-node\n  annotations:\n    dagweave.io/catalog-version: \"1.0.0\"\n    dagweave.io/catalog-category: \"Kubernetes\"\nspec:\n  entrypoint: cordon\n  templates:\n    - name: cordon\n      metadata:\n        annotations:\n          dagweave.io/local-support: unsupported\n          dagweave.io/local-support-reason: \u003e-\n            This step runs kubectl with whatever identity the pod is given. On Dagweave\n            Local that is the default service account of the hidden cluster's argo\n            namespace, which Argo's quick-start install grants create, get and patch on pods\n            and create and get on workflows, and nothing anywhere else. Cordoning patches a\n            node, which that account cannot do, so the step fails on a 403 rather than\n            touching anything. The cluster you meant is one this run cannot reach.\n      inputs:\n        parameters:\n          - name: node\n          - name: action\n            default: \"cordon\"\n      retryStrategy:\n        limit: \"2\"\n        retryPolicy: OnError\n        backoff:\n          duration: 10s\n          factor: \"2\"\n          maxDuration: 2m\n      container:\n        # cgr.dev/chainguard/kubectl:latest-dev\n        image: cgr.dev/chainguard/kubectl@sha256:98f9c337808ecf5d5e80b79af4345762a3d8c803ebf8c857d2dddabf885107ba\n        command: [sh, -c]\n        args:\n          - |\n            set -eu\n            kubectl \"${ACTION}\" \"${NODE}\"\n        env:\n          - name: NODE\n            value: \"{{inputs.parameters.node}}\"\n          - name: ACTION\n            value: \"{{inputs.parameters.action}}\"\n        resources:\n          requests:\n            cpu: 50m\n            memory: 64Mi\n          limits:\n            memory: 256Mi\n",
  "templateSha256": "3102997c00d1b480d7911e7a86c1dad857cd09423f4f2a8bc18d6a630b34bc29",
  "source": "https://github.com/dagweave/catalog/tree/67458f74dbbf913b03177f3cefc69424be85eb1d/catalog/kubectl-cordon-node",
  "catalogSha": "67458f74dbbf913b03177f3cefc69424be85eb1d"
}
