https://github.com/zriyansh/kubernetes-api-crud
https://github.com/zriyansh/kubernetes-api-crud
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/zriyansh/kubernetes-api-crud
- Owner: zriyansh
- Created: 2024-05-27T13:03:49.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-28T21:19:22.000Z (about 2 years ago)
- Last Synced: 2024-05-29T03:51:16.433Z (about 2 years ago)
- Language: Python
- Size: 816 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
## Kubernetes API CRUD operation using Django with React
## Tech Spec
Database - Postgres
Logs APM - SigNoz (attached screenshot above)
Access the app at - http://localhost:3000/applications
## Run Frontend
1. `yarn install`
2. `yarn start`
## Run backend
1. `celery -A k8sapi worker`
2. `redis-server`
3. `python manage.py runserver`
4. python manage.py migrate/makemigrations (optional, if you are setting it up for the first time)
## Commands to run
1. python manage.py makemigrations
2. python manage.py migrate
3. python manage.py runserver
4. start redis server - `redis-server`
5. start celery - `celery -A k8sapi worker`
6. Start frontend and backend
7. Hit the API mentioned below with dummy data
8. You'll see the details in the UI.
## Pod Logs in SigNoz and UI


## APIS
### GET
http://127.0.0.1:8000/deploy/deploy-list
http://127.0.0.1:8000/deploy/apps/1/logs/
### POST
http://127.0.0.1:8000/deploy/
```
{
"namespace": "example-namespace2",
"application_name": "ahoy",
"chart_name": "hello-world",
"chart_version": "1.0.2"
}
```
http://127.0.0.1:8000/authen/login/
```
{
"email": "testuser@example.com",
"password": "Password@123"
}
```
http://127.0.0.1:8000/authen/signup/
```
{
"username": "testuser2",
"email": "testuser2@example.com",
"password": "Password@123"
}
```
### DELETE
http://127.0.0.1:8000/deploy/apps//
.env file sample
```
DATABASE_NAME=scoutflo
DATABASE_USER=postgres
DATABASE_PASSWORD=postgres
DATABASE_HOST=localhost
DATABASE_HOST=my-release-psql-postgresql
DATABASE_PORT=5432
```