{"id":16845023,"url":"https://github.com/phenixblue/k8s-pdb-demo","last_synced_at":"2026-03-06T10:05:51.565Z","repository":{"id":78646890,"uuid":"181088728","full_name":"phenixblue/k8s-pdb-demo","owner":"phenixblue","description":"A Demo of Kubernetes Pod Disruption Budgets","archived":false,"fork":false,"pushed_at":"2019-04-12T22:07:09.000Z","size":488,"stargazers_count":2,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-10T16:10:38.595Z","etag":null,"topics":["budget","demo","disruption","example","k8s","kubernetes","pdb"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phenixblue.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2019-04-12T21:57:37.000Z","updated_at":"2022-06-06T15:50:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"f6c60807-bc55-4212-92a1-537aa47c702b","html_url":"https://github.com/phenixblue/k8s-pdb-demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/phenixblue/k8s-pdb-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phenixblue%2Fk8s-pdb-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phenixblue%2Fk8s-pdb-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phenixblue%2Fk8s-pdb-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phenixblue%2Fk8s-pdb-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phenixblue","download_url":"https://codeload.github.com/phenixblue/k8s-pdb-demo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phenixblue%2Fk8s-pdb-demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30171657,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T07:56:45.623Z","status":"ssl_error","status_checked_at":"2026-03-06T07:55:55.621Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["budget","demo","disruption","example","k8s","kubernetes","pdb"],"created_at":"2024-10-13T12:57:26.219Z","updated_at":"2026-03-06T10:05:51.523Z","avatar_url":"https://github.com/phenixblue.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# PDB Demo\n\nThis is a demo to show the configuration and functionality of a Kubernetes PDB (Pod Disruption Budget).\n\n## Setup\n\n- Open 3 terminals with the appropriate KUBECONFIG context set\n\n    - 1 for interactive work\n\n        - Create Namespace\n\n            ```\n            $ kubectl create ns pdb-test\n            ```\n\n        - Deploy workload\n\n            ```\n            $ kubectl apply -f pdb-tester-deploy.yaml -n pdb-test\n            ```\n\n        - Deploy PDB\n\n            ```\n            $ kubectl apply -f pdb-tester-pdb.yaml -n pdb-test\n            ```\n\n    - 1 for watching the pods\n\n        ```\n        $ watch kubectl get pods -n pdb-test -o wide\n        ```\n\n        ![kubectl get pods Screen Shot](./images/pdb-deployment-pods.png)\n\n    - 1 for watching the PDB\n\n        ```\n        $ watch kubectl get pdb -n pdb-test pdb-tester\n        ```\n\n        ![kubectl get pdb Screen Shot](./images/pdb-info.png)\n\n## Walkthrough\n\n- Show Sample workload with liveness/readiness probe\n\n    ```\n    $ kubectl get deploy -n pdb-test pdb-tester -o yaml\n    ```\n\n- Show PDB configuration\n\n    ```\n    $ kubectl get pdb -n pdb-test pdb-tester -o yaml\n    ```\n\n- Show Pods running across different nodes\n\n    ```\n    $ kubectl get pods -n pdb-test -o wide\n    ```\n\n- Show how a single node drain affects the workload\n\n    ```\n    $ kubectl drain \u003cnode_name\u003e --ignore-daemonsets --delete-local-data\n    ```\n\n    - Watching secondary windows showing the pod recreation and wait for probes\n\n    - Watch PDB metrics update based on currently unavailable pods\n\n- Show concecutive drain operations being blocked by PDB\n\n    ```\n    $ kubectl drain \u003cnode_name1\u003e --ignore-daemonsets --delete-local-data; sleep 5; k drain \u003cnode_name2\u003e --ignore-daemonsets --delete-local-data\n    ```\n\n    ![kubectl drain Screen Shot](./images/node-drain-blocked.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphenixblue%2Fk8s-pdb-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphenixblue%2Fk8s-pdb-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphenixblue%2Fk8s-pdb-demo/lists"}