Skip to content

Instantly share code, notes, and snippets.

@matheushent
Forked from zulhfreelancer/kubectl-apply-stdin.md
Created February 3, 2023 12:06
Show Gist options
  • Select an option

  • Save matheushent/843d9454f8be3e3cf879f5a79e5dce4f to your computer and use it in GitHub Desktop.

Select an option

Save matheushent/843d9454f8be3e3cf879f5a79e5dce4f to your computer and use it in GitHub Desktop.
How to run "kubectl apply -f" with inline YAML as stdin?
$ kubectl apply -f - <<EOF
<-- insert YAML content here -->
EOF

OR

$ cat file.yaml | kubectl apply -f -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment