Skip to content

Building a pipeline for running python scripts in Docker containers managed by Kubernetes.

License

Notifications You must be signed in to change notification settings

JacobMannix/kubernetes-stafford

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kubernetes Stafford

GitHub GitHub top language GitHub last commit

This project is a based off my project stafford-racing-twitter-bot built into a docker container and orchestrated by kubernetes. Kubernetes files include a cronjob for scheduling the script, a secret for securely storing api keys and a persistent volume and associated claim for storing the updated title used by the script.

Docker Image

The docker image can be found at dockerhub/stafford-app. All the specifics of the contents of the image and python app can be found at the stafford-racing-twitter-bot repo.

docker-compose build jmannix3/stafford-app

Kubernetes

The necessary files to run this project with kubernetes are contained within the kubernetes folder.

  • stafford-secrets-example.yaml - used to mount a volume with the secrets to the pod containing the docker container for the app.
  • stafford-pv.yaml - create a necessary persistent volume.
  • stafford-pvc.yaml - create the necessary persistent volume claim needed to store the file in the data folder.
  • stafford-cj.yaml - contains the necessary information to access the secrets volume and persistant volume needed by the app.
kubectl create -f file-name.yaml

About

Building a pipeline for running python scripts in Docker containers managed by Kubernetes.

Topics

Resources

License

Stars

Watchers

Forks