Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/electrocucaracha/k8s-nonpreemptingpriority-demo
PoC for undestanding NonPreemptingPriority Kubernetes Gate feature
https://github.com/electrocucaracha/k8s-nonpreemptingpriority-demo
kubernetes preemption priority-pod vagrant
Last synced: 20 days ago
JSON representation
PoC for undestanding NonPreemptingPriority Kubernetes Gate feature
- Host: GitHub
- URL: https://github.com/electrocucaracha/k8s-nonpreemptingpriority-demo
- Owner: electrocucaracha
- Created: 2019-09-10T17:44:47.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-07-17T22:26:28.000Z (over 4 years ago)
- Last Synced: 2024-11-05T16:12:42.555Z (2 months ago)
- Topics: kubernetes, preemption, priority-pod, vagrant
- Language: Shell
- Homepage:
- Size: 293 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Kubernetes NonPreemptingPriority gate feature demo
[![Build Status](https://travis-ci.org/electrocucaracha/k8s-NonPreemptingPriority-demo.png)](https://travis-ci.org/electrocucaracha/k8s-NonPreemptingPriority-demo)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)In Kubernetes, _Priority_ determines the importance of a Pod to other
Pods and _Preemption_ is the logic which tries to find a Node to
remove one or more low priority Pods to schedule a high priority Pod.The goal of this project is to clarify those concepts through code
examples. This project deploys an All-in-One Kubernetes Cluster with
the `NonPreemptingPriority` feature gate enabled with the
[installer](installer.sh) bash script which is consumed by the
[Vagrantfile](Vagrantfile).## Setup
This project uses [Vagrant tool][2] for provisioning Virtual Machines
automatically. It's highly recommended to use the *setup.sh* script
of the [bootstrap-vagrant project][3] for installing Vagrant
dependencies and plugins required for its project. The script
supports two Virtualization providers (Libvirt and VirtualBox).$ curl -fsSL http://bit.ly/initVagrant | PROVIDER=libvirt bash
Once Vagrant is installed, it's possible to deploy the demo with the
following instruction:$ vagrant up
## Demo
After the All-in-One Kubernetes Cluster is deployed the
[installer](installer.sh) creates two kubernetes cron jobs with
different `PriorityClass` on their pods. The `trivial-job`
executes a counter job every minute and the `urgent-job` every three
minutes. They are using `preemptionPolicy: Never` to avoid any
preemption process.![Demo screenshot](docs/src/img/watch_jobs.png )
As you can see, the jobs of the `urgent-job` have preference in the
queue during the execution of the jobs without any preempt action over
the existing Pods of `trivial-job`.[1]: https://github.com/kubernetes-sigs/kubespray
[2]: https://www.vagrantup.com/
[3]: https://github.com/electrocucaracha/bootstrap-vagrant