{"id":28378062,"url":"https://github.com/robusta-dev/kubernetes-demos","last_synced_at":"2025-06-26T21:31:12.390Z","repository":{"id":103911761,"uuid":"565828698","full_name":"robusta-dev/kubernetes-demos","owner":"robusta-dev","description":"YAMLs for creating Kubernetes errors and other scenarios ","archived":false,"fork":false,"pushed_at":"2025-06-20T09:12:56.000Z","size":2566,"stargazers_count":29,"open_issues_count":2,"forks_count":16,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-06-22T03:52:45.979Z","etag":null,"topics":["devops","k8s","kubernetes","kubernetes-demo"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/robusta-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-14T12:16:36.000Z","updated_at":"2025-04-23T16:20:27.000Z","dependencies_parsed_at":"2024-03-20T06:28:57.078Z","dependency_job_id":"cb0d420f-6dda-4bdf-8bf0-2ff237a51633","html_url":"https://github.com/robusta-dev/kubernetes-demos","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/robusta-dev/kubernetes-demos","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robusta-dev%2Fkubernetes-demos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robusta-dev%2Fkubernetes-demos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robusta-dev%2Fkubernetes-demos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robusta-dev%2Fkubernetes-demos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robusta-dev","download_url":"https://codeload.github.com/robusta-dev/kubernetes-demos/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robusta-dev%2Fkubernetes-demos/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262145141,"owners_count":23265873,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["devops","k8s","kubernetes","kubernetes-demo"],"created_at":"2025-05-30T01:35:32.746Z","updated_at":"2025-06-26T21:31:12.384Z","avatar_url":"https://github.com/robusta-dev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Introduction \nPractice Kubernetes troubleshooting with realistic error scenarios.\n\nEach scenario is run with `kubectl apply` commands. To cleanup, run `kubectl delete` on the same.\n\n# Simple Scenarios\n\n\u003cdetails\u003e\n\u003csummary\u003eCrashing Pod (CrashLoopBackoff)\u003c/summary\u003e\n\n```\nkubectl apply -f https://raw.githubusercontent.com/robusta-dev/kubernetes-demos/main/crashpod/broken.yaml\n```\n\nTo get notifications like below, install [Robusta](https://github.com/robusta-dev/robusta):\n\u003cimg width=\"500\" src=\"./example_images/crashingpod.png\"\u003e\n\u003c/details\u003e\n\n\n\u003cdetails\u003e\n\u003csummary\u003eOOMKilled Pod (Out of Memory Kill)\u003c/summary\u003e\n\n```\nkubectl apply -f https://raw.githubusercontent.com/robusta-dev/kubernetes-demos/main/oomkill/oomkill_job.yaml\n```\n\nTo get notifications like below, install [Robusta](https://github.com/robusta-dev/robusta):\n\u003cimg width=\"500\" src=\"./example_images/oomkillpod.png\"\u003e\n\u003c/details\u003e\n\n\n\u003cdetails\u003e\n\u003csummary\u003eHigh CPU Throttling (CPUThrottlingHigh)\u003c/summary\u003e\n\nApply the following YAML and wait **15 minutes**. (CPU throttling is only an issue if it occurs for a meaningful period of time. Less than 15 minutes of throttling typically does not trigger an alert.)\n\n```\nkubectl apply -f https://raw.githubusercontent.com/robusta-dev/kubernetes-demos/main/cpu_throttling/throttling.yaml\n```\n\nTo get notifications like below, install [Robusta](https://github.com/robusta-dev/robusta):\n\u003cimg width=\"500\" src=\"./example_images/highcputhrottling.png\"\u003e \n\u003c/details\u003e\n\n\n\u003cdetails\u003e\n\u003csummary\u003ePending Pod (Unschedulable due to Node Selectors)\u003c/summary\u003e\n\nApply the following YAML and wait **15 minutes**. (By default, most systems only alert after pods are pending for 15 minutes. This prevents false alarms on autoscaled clusters, where it's OK for pods to be temporarily pending.)\n\n```\nkubectl apply -f https://raw.githubusercontent.com/robusta-dev/kubernetes-demos/main/pending_pods/pending_pod_node_selector.yaml\n```\n\nTo get notifications like below, install [Robusta](https://github.com/robusta-dev/robusta):\n\u003cimg width=\"500\" src=\"./example_images/pendingpod.png\"\u003e\n\u003c/details\u003e\n\n\n\n\u003cdetails\u003e\n\u003csummary\u003eImagePullBackOff\u003c/summary\u003e\n\n```\nkubectl apply -f https://raw.githubusercontent.com/robusta-dev/kubernetes-demos/main/image_pull_backoff/no_such_image.yaml \n```\n\nTo get notifications like below, install [Robusta](https://github.com/robusta-dev/robusta):\n\u003cimg width=\"500\" src=\"./example_images/imagepullbackoff.png\"\u003e\n\u003c/details\u003e\n\n\n\n\u003cdetails\u003e\n\u003csummary\u003eLiveness Probe Failure\u003c/summary\u003e\n\n```\nkubectl apply -f https://raw.githubusercontent.com/robusta-dev/kubernetes-demos/main/liveness_probe_fail/failing_liveness_probe.yaml\n```\n\nTo get notifications like below, install [Robusta](https://github.com/robusta-dev/robusta):\n\u003cimg width=\"500\" src=\"./example_images/failedlivenessprobe.png\"\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eReadiness Probe Failure\u003c/summary\u003e\n\n```\nkubectl apply -f https://raw.githubusercontent.com/robusta-dev/kubernetes-demos/main/readiness_probe_fail/failing_readiness_probe.yaml\n```\n\n\u003c/details\u003e\n\n\n\u003cdetails\u003e\n\u003csummary\u003eJob Failure\u003c/summary\u003e\nThe job will fail after 60 seconds, then attempt to run again. After two attempts, it will fail for good.\n\n```\nkubectl apply -f https://raw.githubusercontent.com/robusta-dev/kubernetes-demos/main/job_failure/job_crash.yaml\n```\n\nTo get notifications like below, install [Robusta](https://github.com/robusta-dev/robusta):\n\u003cimg width=\"500\" src=\"./example_images/failingjobs.png\"\u003e\n\u003c/details\u003e\n\n\n\n\u003cdetails\u003e\n\u003csummary\u003eFailed Helm Releases\u003c/summary\u003e\nDeliberately deploy a failing Helm release:\n\n```shell\nhelm repo add robusta https://robusta-charts.storage.googleapis.com \u0026\u0026 helm repo update\nhelm install kubewatch robusta/kubewatch --set='rbac.create=true,updateStrategy.type=Error' --namespace demo-namespace\n```\n\nUpgrade the release so it succeeds:\n```shell\nhelm upgrade kubewatch robusta/kubewatch --set='rbac.create=true' --namespace demo-namespace --create-namespace\n```\n\nClean up by removing the release and deleting the namespace:\n```shell\nhelm del kubewatch  --namespace demo-namespace \nkubectl delete namespace demo-namespace \n```\n\nTo get notifications like below, install [Robusta](https://github.com/robusta-dev/robusta) and setup [Helm Releases Monitoring](https://docs.robusta.dev/master/playbook-reference/triggers/helm-releases-monitoring.html) \n\u003cimg width=\"500\" src=\"./example_images/helm_monitoring_kubewatch.png\"\u003e\n\u003c/details\u003e\n\n\n# Advanced Scenarios\n\n\u003cdetails\u003e\n\u003csummary\u003eCorrelate Changes and Errors\u003c/summary\u003e\n\nDeploy a healthy pod. Then break it. \n\n```shell\nkubectl apply -f https://raw.githubusercontent.com/robusta-dev/kubernetes-demos/main/crashpod/healthy.yaml\nkubectl apply -f https://raw.githubusercontent.com/robusta-dev/kubernetes-demos/main/crashpod/broken.yaml\n```\nIf someone else made this change, would you be able to immediately pinpoint the change that broke the application?\n\nTo get notifications like below, install [Robusta](https://github.com/robusta-dev/robusta).\n\n\u003cimg width=\"500\" src=\"./example_images/changetracking.png\"\u003e\n\u003c/details\u003e\n\n\n\n\u003cdetails\u003e\n\u003csummary\u003eTrack Deployment Changes\u003c/summary\u003e\n\nCreate an nginx deployment. Then simulate multiple unexpected changes to this deployment.\n\n```shell\nkubectl apply -f https://raw.githubusercontent.com/robusta-dev/kubernetes-demos/main/deployment_image_change/before_image_change.yaml\nkubectl apply -f https://raw.githubusercontent.com/robusta-dev/kubernetes-demos/main/deployment_image_change/after_image_change.yaml\n```\n\nTo get notifications like below, install [Robusta](https://github.com/robusta-dev/robusta) and [setup Kubernetes change tracking](https://docs.robusta.dev/master/tutorials/playbook-track-changes.html)\n\n\u003cimg width=\"500\" src=\"./example_images/deployment-image-change.png\"\u003e\n\u003c/details\u003e\n\n\n\n\u003cdetails\u003e\n\u003csummary\u003eTrack Ingress Changes\u003c/summary\u003e\n\nCreate an ingress. Then changes its path and secretName to simulate an unexpected ingress modification.\n\n```shell\nkubectl apply -f https://raw.githubusercontent.com/robusta-dev/kubernetes-demos/main/ingress_port_path_change/before_port_path_change.yaml\nkubectl apply -f https://raw.githubusercontent.com/robusta-dev/kubernetes-demos/main/ingress_port_path_change/after_port_path_change.yaml\n```\n\nTo get notifications like below, install [Robusta](https://github.com/robusta-dev/robusta) and [setup Kubernetes change tracking](https://docs.robusta.dev/master/tutorials/playbook-track-changes.html)\n\n\u003cimg width=\"500\" src=\"./example_images/ingress-image-change.png\"\u003e\n\u003c/details\u003e\n\n\n\n\u003cdetails\u003e\n\u003csummary\u003eDrift Detection and Namespace Diff\u003c/summary\u003e\n\nDeploy two variants of the same application in different namespaces:\n\n```shell\nkubectl apply -f https://raw.githubusercontent.com/robusta-dev/kubernetes-demos/main/namespace_drift/example.yaml\n```\n\nCan you quickly tell the difference between the `compare1` and `compare2` namespaces? What is the drift between them?\n\nTo do so with Robusta, install [Robusta](https://github.com/robusta-dev/robusta) and enable the UI.\n\n\n\u003cimg width=\"500\" src=\"./example_images/driftandnamespace.png\"\u003e\n\u003c/details\u003e\n\n\n\n\u003cdetails\u003e\n\u003csummary\u003eInefficient GKE Nodes\u003c/summary\u003e\n\nOn GKE, nodes can reserve more than 50% of CPU for themselves. Users pay for CPU that is unavailable to applications.\n\nReproduction:\n\n1. Create a default GKE cluster with autopilot disabled. Don't change any other settings.\n2. Deploy the following pod:\n\n```\nkubectl apply -f https://raw.githubusercontent.com/robusta-dev/kubernetes-demos/main/gke_node_allocatable/gke_issue.yaml\n```\n\n3. Run `kubectl get pods -o wide gke-node-allocatable-issue`\n\nThe pod will be Pending. **A Pod requesting 1 CPU cannot run on an empty node with 2 CPUs!**\n\nTo see problems like this with Robusta, install [Robusta](https://github.com/robusta-dev/robusta) and enable the UI.\n\n\u003cimg width=\"500\" src=\"./example_images/highoverhead.png\"\u003e\n\u003c/details\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobusta-dev%2Fkubernetes-demos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobusta-dev%2Fkubernetes-demos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobusta-dev%2Fkubernetes-demos/lists"}