{
  "name": "kubectl-apply",
  "title": "kubectl apply",
  "category": "Kubernetes",
  "tags": [
    "kubectl",
    "kubernetes"
  ],
  "version": "1.0.6",
  "date": "2026-10-19",
  "notes": "Repin bitnami/kubectl:latest on the tag's current digest. What is still open against it is recorded in hack/image-cve-exceptions.txt. Same tool, same arguments; nothing about what the step runs changes.",
  "latest": true,
  "installable": true,
  "url": "https://catalog.dagweave.com/api/v1/items/kubectl-apply/1.0.6.json",
  "templateUrl": "https://catalog.dagweave.com/api/v1/items/kubectl-apply/1.0.6/template.yaml",
  "entrypoint": "apply",
  "parameters": [
    {
      "name": "manifest",
      "title": "Manifest (inline YAML)",
      "description": "Inline manifest YAML to apply. Used when a manifest path is not given.",
      "type": "string",
      "required": false,
      "default": ""
    },
    {
      "name": "manifest-path",
      "title": "Manifest path",
      "description": "Path to a manifest file to apply instead of the inline manifest.",
      "type": "string",
      "required": false,
      "default": ""
    },
    {
      "name": "namespace",
      "title": "Namespace",
      "type": "string",
      "required": false,
      "default": "default"
    }
  ],
  "images": [
    {
      "ref": "bitnami/kubectl@sha256:bedd34c910e2a5ce9836813d16444af449d7fe07a29136d59f34e861e8e660c5",
      "repository": "bitnami/kubectl",
      "tag": "latest",
      "digest": "sha256:bedd34c910e2a5ce9836813d16444af449d7fe07a29136d59f34e861e8e660c5"
    }
  ],
  "install": {
    "kubectl": "kubectl apply -n argo -f https://catalog.dagweave.com/api/v1/items/kubectl-apply/1.0.6/template.yaml",
    "argo": "argo template create -n argo https://catalog.dagweave.com/api/v1/items/kubectl-apply/1.0.6/template.yaml"
  },
  "template": "apiVersion: argoproj.io/v1alpha1\nkind: WorkflowTemplate\nmetadata:\n  name: kubectl-apply\n  labels:\n    dagweave.io/catalog-item: kubectl-apply\n  annotations:\n    dagweave.io/catalog-version: \"1.0.6\"\n    dagweave.io/catalog-category: \"Kubernetes\"\nspec:\n  entrypoint: apply\n  templates:\n    - name: apply\n      metadata:\n        annotations:\n          # Dagweave Local reads these off the body, the only part of an item that lands in a user's file.\n          dagweave.io/local-support: unsupported\n          dagweave.io/local-support-reason: \u003e-\n            This step shells out to kubectl and applies with whatever identity the pod\n            is given. On Dagweave Local that is the default service account of the\n            hidden cluster's argo namespace, which Argo's quick-start install grants\n            create, get and patch on pods and create and get on workflows, and nothing\n            anywhere else. Point the step at the argo namespace with a Pod or a Workflow\n            in hand and the object really is created, in a cluster you cannot see and\n            did not choose, and the step exits 0 as though it had reached yours. Every\n            other kind, and every other namespace including this item's own default, is\n            refused by RBAC and the step fails. Apply against the cluster you mean.\n      inputs:\n        parameters:\n          # Inline manifest YAML to apply. Used when manifest-path is blank.\n          - name: manifest\n            default: \"\"\n          # Path to a manifest file to apply instead of the inline manifest.\n          - name: manifest-path\n            default: \"\"\n          - name: namespace\n            default: default\n      container:\n        # bitnami/kubectl:latest\n        image: bitnami/kubectl@sha256:bedd34c910e2a5ce9836813d16444af449d7fe07a29136d59f34e861e8e660c5\n        command: [sh, -c]\n        # Applies against the cluster using the pod's in-cluster serviceAccount.\n        # Prefers manifest-path when set, otherwise pipes the inline manifest.\n        args:\n          - |\n            set -eu\n            if [ -n \"${MANIFEST_PATH}\" ]; then\n              kubectl apply -n \"${NAMESPACE}\" -f \"${MANIFEST_PATH}\"\n            else\n              printf '%s' \"${MANIFEST}\" | kubectl apply -n \"${NAMESPACE}\" -f -\n            fi\n        env:\n          - name: MANIFEST\n            value: \"{{inputs.parameters.manifest}}\"\n          - name: MANIFEST_PATH\n            value: \"{{inputs.parameters.manifest-path}}\"\n          - name: NAMESPACE\n            value: \"{{inputs.parameters.namespace}}\"\n",
  "templateSha256": "faeb1ed692b9480317612d175a55c98aa8fe8c0814ecdf24356e14aa3d087755",
  "source": "https://github.com/dagweave/catalog/tree/67458f74dbbf913b03177f3cefc69424be85eb1d/catalog/kubectl-apply",
  "catalogSha": "67458f74dbbf913b03177f3cefc69424be85eb1d"
}
