Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/murshidazher/kube-python-helm
🐍 🐳 ☸ An example repository for python microservice with k8s
https://github.com/murshidazher/kube-python-helm
container docker k8s microservices python
Last synced: about 4 hours ago
JSON representation
🐍 🐳 ☸ An example repository for python microservice with k8s
- Host: GitHub
- URL: https://github.com/murshidazher/kube-python-helm
- Owner: murshidazher
- License: mit
- Created: 2023-09-29T19:23:47.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-02T19:48:20.000Z (about 1 year ago)
- Last Synced: 2024-04-18T20:55:39.574Z (7 months ago)
- Topics: container, docker, k8s, microservices, python
- Language: Smarty
- Homepage:
- Size: 10.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# [kube-python-helm](https://github.com/murshidazher/kube-python-helm)
An example repository for python microservice with k8s
- [kube-python-helm](#kube-python-helm)
- [Developing](#developing)
- [Create Virtual Environment](#create-virtual-environment)
- [Up \& Running](#up--running)
- [License](#license)## Developing
### Create Virtual Environment
Isolate the dependencies using the python virtual environment.
```sh
python -m venv .venv
source .venv/bin/activate
```Building the docker image
```sh
docker build -t webapp:1.0 .
docker run -d -p 5000:5000 --name web webapp:1.0 # to start
``````
kubectl apply -f deployment.yml
kubectl apply -f service.ymlkubectl get pods
kubectl get service # http://localhost:30180/
```To stop all the services in the directory
```sh
kubectl delete -f .
```To get the service url
```sh
kubectl get pod && kubectl get service # k get pod,service
minikube service web-service
```## Up & Running
```sh
cd src && python app.py
```## License
[MIT](./LICENSE) © Murshid Azher.