-
-
Save vfarcic/d56800b720e4d5c54e2c805ae04bc19c 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
# Source: https://gist.github.com/d56800b720e4d5c54e2c805ae04bc19c | |
################################################ | |
# Carvel ytt Instead Of Helm? # | |
# A Better Way To Manage Kubernetes Resources? # | |
# https://youtu.be/DLnXkH2keNg # | |
################################################ | |
# Additional Info: | |
# - Carvel ytt: https://carvel.dev/ytt | |
# - Kustomize - How to Simplify Kubernetes Configuration Management: https://youtu.be/Twtbg6LFnAg | |
# - Helm vs Kustomize - The Fight Between Templating and Patching in Kubernetes: https://youtu.be/ZMFYSm0ldQ0 | |
# - Helm And Kustomize Replacement? Jsonnet With Grafana Tanka: https://youtu.be/-qpcsUXElYc | |
# - Should We Replace Docker Desktop With Rancher Desktop?: https://youtu.be/bYVfCp9dRTE | |
######### | |
# Setup # | |
######### | |
# Create a Kubernetes cluster | |
# This demo was tested on Rancher Desktop, but it should work with any Kubernetes cluster | |
# Please watch https://youtu.be/bYVfCp9dRTE if you are not familiar with Rancher Desktop | |
# Install ytt from https://carvel.dev/ytt/docs/v0.41.0/install/ | |
git clone https://github.com/vfarcic/ytt-demo | |
cd ytt-demo | |
kubectl create namespace production | |
#################### | |
# Using Carvel ytt # | |
#################### | |
ytt --file ytt/_ytt_lib/resources/ | |
ls -1 ytt/_ytt_lib/resources/ | |
cat ytt/_ytt_lib/resources/schema.yaml | |
cat ytt/_ytt_lib/resources/labels.lib.yaml | |
cat ytt/_ytt_lib/resources/config.yaml | |
ytt --file ytt/ | |
ls -1 ytt/ | |
cat ytt/config.yaml | |
cat ytt/values.yaml | |
ytt --file ytt/ \ | |
--data-values-file values-dev.yaml | |
ytt --file ytt/ \ | |
--data-values-file values-staging.yaml | |
cat values-dev.yaml | |
cat values-staging.yaml | |
ytt --file ytt/ \ | |
--data-values-file values-staging.yaml \ | |
| kubectl --namespace production \ | |
apply --filename - | |
########### | |
# Destroy # | |
########### | |
ytt --file ytt/ \ | |
--data-values-file values-staging.yaml \ | |
| kubectl --namespace production \ | |
delete --filename - | |
kubectl delete namespace production |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment