Skip to content

cloudnative-zoo/k8s-deployment-restarter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kubernetes-deployment-restarter-api

Requirements

Docker
Python > 3.10
kubectl

Local setup

Create a python virtual environment

python -m venv venv
activate venv `source venv/bin/activate
pip install -r requirements.txt

To run locally

export KUBECONFIG="~/.kube/config"
export API_KEY="secret"
python main.py

Run in Kubernetes

Apply manifests

kubectl apply -f manifests/

Test

curl -X 'GET' 'http://localhost:8080/restart-deployment/YourNAMESPACE_NAME/YourDEPLOYMENT_NAME?api_key=YourAPIKEY'

or open in the browser

http://localhost:8080/restart-deployment/YourNAMESPACE_NAME/YourDEPLOYMENT_NAME?api_key=YourAPIKEY

About

K8s Deployment Restarter Rest API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages