Skip to content

Instantly share code, notes, and snippets.

@misskecupbung
Created October 6, 2022 16:28
Show Gist options
  • Save misskecupbung/5c684cd1166a813d80c2868e303ef6c9 to your computer and use it in GitHub Desktop.
Save misskecupbung/5c684cd1166a813d80c2868e303ef6c9 to your computer and use it in GitHub Desktop.
# 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