44 lines
889 B
Markdown
44 lines
889 B
Markdown
# Quick Start - Kubernetes in 5 Minutes
|
|
|
|
## 🎯 Goal
|
|
Run Kubernetes locally in containers and deploy your apps.
|
|
|
|
## ⚡ Fast Track
|
|
|
|
### 1. Install k3d (if not using Docker Desktop)
|
|
```bash
|
|
# Windows: Download from https://k3d.io/
|
|
# Or use Docker Desktop Kubernetes (easier!)
|
|
```
|
|
|
|
### 2. Create Cluster
|
|
```bash
|
|
k3d cluster create mycluster --servers 1 --agents 2
|
|
```
|
|
|
|
### 3. Build Images
|
|
```bash
|
|
cd E:\nats\kubernetes
|
|
docker build -f Dockerfile --target api -t fastapi-backend:latest .
|
|
docker build -f Dockerfile --target worker -t nats-worker:latest .
|
|
```
|
|
|
|
### 4. Update Manifests
|
|
- `manifests/fastapi-deployment.yaml`: Change image to `fastapi-backend:latest`
|
|
- `manifests/worker-deployment.yaml`: Change image to `nats-worker:latest`
|
|
|
|
### 5. Deploy
|
|
```bash
|
|
./deploy.sh
|
|
```
|
|
|
|
### 6. Check
|
|
```bash
|
|
kubectl get pods -n nats-backend
|
|
```
|
|
|
|
## 🎉 Done!
|
|
|
|
Your apps are running in Kubernetes!
|
|
|