Created
March 13, 2022 16:21
-
-
Save vfarcic/e27c3e62438479efc3b676edbe57aacf to your computer and use it in GitHub Desktop.
This file contains hidden or 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: TODO: | |
######### | |
# TODO: # | |
# TODO: # | |
######### | |
# Additional Info: | |
# - Production-Ready Kubernetes Clusters Using Crossplane Compositions: https://youtu.be/uMC2QQfMctg | |
# - How To Shift Left Infrastructure Management Using Crossplane Compositions: https://youtu.be/AtbS1u2j7po | |
# - How To Package And Distribute Crossplane Compositions As Container Images: https://youtu.be/i7MFiInJV8c | |
# - How To Apply GitOps To Everything - Combining Argo CD And Crossplane: https://youtu.be/yrj4lmScKHQ | |
######### | |
# Setup # | |
######### | |
# Create a Kubernetes cluster with an Ingress | |
# If not using Rancher Desktop, replace `127.0.0.1` with the base host accessible through NGINX Ingress | |
export INGRESS_HOST=127.0.0.1 | |
git clone https://github.com/vfarcic/devops-toolkit-crossplane | |
cd devops-toolkit-crossplane | |
kubectl create namespace monitoring | |
# Edit `host` values in `examples/monitoring/prometheus-no-claim.yaml` | |
#################### | |
# Setup Crossplane # | |
#################### | |
helm repo add crossplane-stable \ | |
https://charts.crossplane.io/stable | |
helm repo update | |
helm upgrade --install \ | |
crossplane crossplane-stable/crossplane \ | |
--namespace crossplane-system \ | |
--create-namespace \ | |
--wait | |
kubectl apply \ | |
--filename crossplane-config/provider-helm-incluster.yaml | |
kubectl apply \ | |
--filename crossplane-config/config-monitoring.yaml | |
######### | |
# TODO: # | |
######### | |
cat examples/monitoring/prom-loki.yaml | |
kubectl --namespace monitoring apply \ | |
--filename examples/monitoring/prom-loki.yaml | |
kubectl --namespace monitoring \ | |
get monitoringclaims | |
kubectl --namespace monitoring \ | |
get all,ingresses,configmaps,secrets | |
echo "http://monitor.$INGRESS_HOST.nip.io" | |
# Open it in a browser | |
echo "http://alert.$INGRESS_HOST.nip.io" | |
# Open it in a browser | |
echo "http://dashboard.$INGRESS_HOST.nip.io" | |
# Open it in a browser | |
kubectl --namespace monitoring \ | |
get secret monitoring-grafana \ | |
--output jsonpath="{.data.admin-password}" \ | |
| base64 --decode | |
# User: admin; Password: the output from the previous command | |
ls -1 packages/monitoring/ | |
cat packages/monitoring/prom-loki.yaml | |
########### | |
# Destroy # | |
########### | |
# Destroy or reset the cluster |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment