https://github.com/dabcoder/k8s-dd-minikube
K8s and Datadog
https://github.com/dabcoder/k8s-dd-minikube
docker flask kubernetes minikube
Last synced: about 2 months ago
JSON representation
K8s and Datadog
- Host: GitHub
- URL: https://github.com/dabcoder/k8s-dd-minikube
- Owner: dabcoder
- Created: 2018-04-01T16:10:16.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-04-01T17:09:04.000Z (about 8 years ago)
- Last Synced: 2025-12-26T23:52:53.401Z (5 months ago)
- Topics: docker, flask, kubernetes, minikube
- Language: Python
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# k8s-dd-minikube
### Start minikube and use its Docker daemon:
```
minikube start
...
eval $(minikube docker-env)
```
### Build the web app Docker image
`cd` in the `web` directory. Then run:
```
docker build -t web-flask:v1 .
```
### Create a Deployment that manages a Pod that runs a Container based on the web-flask:v1 Docker image:
Flask uses the port `5000` by default.
```
kubectl run web-flask --image=web-flask:v1 --port=5000
```
### Pull the latest Redis Docker image
```
docker pull redis:latest
```
### Create a Deployment that manages a Pod that runs a Container based on the redis:latest Docker image:
Redis will use the port `6379`.
```
kubectl run redis --image=redis:latest --port=6379
```
### Create Services
```
kubectl expose deployment web-flask --type=LoadBalancer
kubectl expose deployment redis --type=LoadBalancer
```
### Run the web app
```
minikube service web-flask
```