Skip to content

Instantly share code, notes, and snippets.

@vfarcic
Created January 22, 2023 19:50
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vfarcic/4470f6bcce8659ad9359eb492c650e83 to your computer and use it in GitHub Desktop.
Save vfarcic/4470f6bcce8659ad9359eb492c650e83 to your computer and use it in GitHub Desktop.
# Source: https://gist.github.com/4470f6bcce8659ad9359eb492c650e83
##########################################################
# Kubernetes Troubleshooting And Management With Komodor #
# https://youtu.be/kZPOtz85_zI #
##########################################################
# Additional Info:
# - Komodor: https://komodor.com
#########
# Setup #
#########
# Create a Kubernetes cluster with an Ingress set as the default
# Ingress class.
# Replace `[...]` with the external IP of the Ingress service
export INGRESS_HOST=[...]
# Open `https://komodor.com`, register and login.
# Open https://app.komodor.com/main/integration
# Click the `Add Cluster` button in the `Kubernetes Cluster` section
# Follow the instructions
git clone https://github.com/vfarcic/komodor-demo-2
cd komodor-demo-2
kubectl create namespace production
helm repo add argo https://argoproj.github.io/argo-helm
helm repo add prometheus \
https://prometheus-community.github.io/helm-charts
helm repo update
helm upgrade --install \
argocd argo/argo-cd \
--namespace argocd \
--create-namespace \
--set server.ingress.hosts="{argo-cd.$INGRESS_HOST.nip.io}" \
--values argocd/helm-values.yaml \
--wait
kubectl apply --filename argocd/project.yaml
helm upgrade --install prometheus prometheus/prometheus \
--namespace monitoring --create-namespace --wait
####################
# Komodor Services #
####################
kubectl --namespace production apply --filename k8s
diff k8s/deployment.yaml deployment-bad.yaml
kubectl --namespace production apply \
--filename deployment-bad.yaml
kubectl --namespace production apply --filename k8s
####################
# Komodor Monitors #
####################
diff k8s/deployment.yaml deployment-1-replica.yaml
kubectl --namespace production apply \
--filename deployment-1-replica.yaml
cat hpa.yaml
kubectl --namespace production apply \
--filename hpa.yaml
#################################
# Custom Resources With Komodor #
#################################
kubectl --namespace production delete \
--filename k8s
kubectl --namespace production delete \
--filename hpa.yaml
cat argocd/app.yaml
kubectl apply --filename argocd/app.yaml
echo "http://argo-cd.$INGRESS_HOST.nip.io"
# Open the URL in a browser
# User: admin
# Password: admin123
kubectl --namespace argocd get application app --output yaml
###################
# Komodor Pricing #
###################
# Open https://komodor.com/pricing-and-plans in a browser
###########
# Destroy #
###########
# Destroy or reset the cluster
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment