Cordon or uncordon a node
Stop new pods from landing on a node, or let them land on it again, without touching the pods already there.
Install v1.0.0
Installs the template into your Argo namespace. The URL is pinned to this version.
kubectl apply -n argo -f https://catalog.dagweave.com/api/v1/items/kubectl-cordon-node/1.0.0/template.yaml
Or with the Argo CLI:
argo template create -n argo https://catalog.dagweave.com/api/v1/items/kubectl-cordon-node/1.0.0/template.yaml
Facts
- Category
- Kubernetes
- Tags
- kubectl kubernetes
- Entrypoint
cordon- Template SHA-256
3102997c00d1b480d7911e7a86c1dad857cd09423f4f2a8bc18d6a630b34bc29- Source
- kubectl-cordon-node at catalog commit 67458f7
- API
- item document, latest template.yaml
Images and provenance
Every image is pinned by digest, so a rebuilt tag can never change what this version runs.
| Repository | Tag | Digest |
|---|---|---|
cgr.dev/chainguard/kubectl | latest-dev | sha256:98f9c337808ecf5d5e80b79af4345762a3d8c803ebf8c857d2dddabf885107ba |
Parameters
| Name | Description | Default |
|---|---|---|
node required |
Name of the node. Example ip-10-0-3-17.eu-west-1.compute.internal |
none |
action |
cordon blocks new pods, uncordon allows them again. One of cordon, uncordon |
cordon |
WorkflowTemplate
apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
name: kubectl-cordon-node
labels:
dagweave.io/catalog-item: kubectl-cordon-node
annotations:
dagweave.io/catalog-version: "1.0.0"
dagweave.io/catalog-category: "Kubernetes"
spec:
entrypoint: cordon
templates:
- name: cordon
metadata:
annotations:
dagweave.io/local-support: unsupported
dagweave.io/local-support-reason: >-
This step runs kubectl with whatever identity the pod is given. On Dagweave
Local that is the default service account of the hidden cluster's argo
namespace, which Argo's quick-start install grants create, get and patch on pods
and create and get on workflows, and nothing anywhere else. Cordoning patches a
node, which that account cannot do, so the step fails on a 403 rather than
touching anything. The cluster you meant is one this run cannot reach.
inputs:
parameters:
- name: node
- name: action
default: "cordon"
retryStrategy:
limit: "2"
retryPolicy: OnError
backoff:
duration: 10s
factor: "2"
maxDuration: 2m
container:
# cgr.dev/chainguard/kubectl:latest-dev
image: cgr.dev/chainguard/kubectl@sha256:98f9c337808ecf5d5e80b79af4345762a3d8c803ebf8c857d2dddabf885107ba
command: [sh, -c]
args:
- |
set -eu
kubectl "${ACTION}" "${NODE}"
env:
- name: NODE
value: "{{inputs.parameters.node}}"
- name: ACTION
value: "{{inputs.parameters.action}}"
resources:
requests:
cpu: 50m
memory: 64Mi
limits:
memory: 256Mi
Version history
Read from the item's changelog. Each version has its own JSON document; the pinned catalogue vendors the manifest of the latest one, so that is the version that installs.
-
1.0.0 latest 2026-10-18
Initial release.
kubectl apply -n argo -f https://catalog.dagweave.com/api/v1/items/kubectl-cordon-node/1.0.0/template.yamlargo template create -n argo https://catalog.dagweave.com/api/v1/items/kubectl-cordon-node/1.0.0/template.yaml
Run it once
After installing, from the command line.
argo submit -n argo --from workflowtemplate/kubectl-cordon-node \
-p node=ip-10-0-3-17.eu-west-1.compute.internal
Workflow that references it
A Workflow with the required parameters filled from the examples.
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: kubectl-cordon-node-
spec:
workflowTemplateRef:
name: kubectl-cordon-node
arguments:
parameters:
- name: node
value: "ip-10-0-3-17.eu-west-1.compute.internal"
As a step of a larger workflow
steps:
- - name: kubectl-cordon-node
templateRef:
name: kubectl-cordon-node
template: cordon