Skip to content

Instantly share code, notes, and snippets.

@vfarcic
Created February 17, 2024 17:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vfarcic/ba423e929f368f12cbaa5ce2da5a6b5b to your computer and use it in GitHub Desktop.
Save vfarcic/ba423e929f368f12cbaa5ce2da5a6b5b to your computer and use it in GitHub Desktop.
# Source: https://gist.github.com/vfarcic/ba423e929f368f12cbaa5ce2da5a6b5b
#########################################################################
# Kubernetes Events Are Broken (If You Are Building a Developer Portal) #
#########################################################################
#########
# Setup #
#########
# Install `nix` by following the instructions at https://nix.dev/install-nix. Watch https://youtu.be/0ulldVwZiKA if you are not familiar with Nix. Alternatively, you can skip executing `nix-shell` but, in that case, you need the tools used in this demo installed on your host machine.
git clone https://github.com/vfarcic/kubernetes-events-demo
cd kubernetes-events-demo
nix-shell --run $SHELL
chmod +x setup.sh
./setup.sh
########
# Demo #
########
kubectl --namespace a-team get all
kubectl --namespace a-team delete pods \
--selector app.kubernetes.io/name=silly-demo
kubectl --namespace a-team get all
kubectl get events
kubectl --namespace a-team describe replicaset \
--selector app.kubernetes.io/name=silly-demo
kubectl --namespace a-team describe deployment silly-demo
cat aws-sql.yaml
kubectl --namespace a-team apply --filename aws-sql.yaml
kubectl --namespace a-team get sqlclaims
kubectl --namespace a-team describe sqlclaim my-db
crossplane beta trace sqlclaim my-db --namespace a-team
kubectl get sqls
kubectl describe sqls --selector crossplane.io/claim-name=my-db
kubectl get managed
kubectl describe vpc.ec2.aws.upbound.io my-db
###########
# Destroy #
###########
kind delete cluster
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment