Kubernetes: Difference between revisions
From wiki.vacula.xyz
| Line 6: | Line 6: | ||
== Tips and Tricks == | == Tips and Tricks == | ||
Don't write YAML files, generate them. Use <code>kubectl create</code> with the options <code>--dry-run=client -o yaml</code> to generate the YAML files. Alternatively, use a <code>kubectl get</code> command with <code>-o yaml</code>. | Don't write YAML files, generate them. Use <code>kubectl create</code> with the options <code>--dry-run=client -o yaml</code> to generate the YAML files. Alternatively, use a <code>kubectl get</code> command with <code>-o yaml</code>. Use <code>kubectl apply -f</code> to create or update resources from a YAML file. | ||
Revision as of 15:25, 1 May 2025
Concepts
Decoupling:
- run resources anywhere
- don't tie an application to a specific server
- don't store configuration within the application
Tips and Tricks
Don't write YAML files, generate them. Use kubectl create with the options --dry-run=client -o yaml to generate the YAML files. Alternatively, use a kubectl get command with -o yaml. Use kubectl apply -f to create or update resources from a YAML file.