Created
October 6, 2022 16:28
-
-
Save misskecupbung/5c684cd1166a813d80c2868e303ef6c9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# create Kustomize file | |
cat > ./kustomization.yaml << EOF | |
secretGenerator: | |
- name: mysql-pass | |
literals: | |
- password=gkebackup2022 | |
EOF | |
# download manifests | |
curl -LO https://k8s.io/examples/application/wordpress/mysql-deployment.yaml | |
curl -LO https://k8s.io/examples/application/wordpress/wordpress-deployment.yaml | |
# update Kustomize file (note >> which appends original file) | |
cat >> ./kustomization.yaml << EOF | |
resources: | |
- mysql-deployment.yaml | |
- wordpress-deployment.yaml | |
EOF | |
# deploy (using built-in kustomize feature of kubectl) | |
kubectl apply -k ./ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment