Skip to content

Commit 5458c1d

Browse files
committed
Update README.md
1 parent 648c541 commit 5458c1d

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

README.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,62 @@ docker-compose up --build
9797

9898
You can then access the app at `https://your_codespace_name-5173.app.github.dev/`
9999

100+
### Kubernetes Usage
101+
102+
To run GoChat using Kubernetes locally, you'll need to install a few prerequisites and use Minikube to create a local cluster with multiple nodes.
103+
104+
#### 1. Install Prerequisites
105+
106+
- [kubectl](https://kubernetes.io/docs/tasks/tools/) (Kubernetes CLI)
107+
- [Minikube](https://minikube.sigs.k8s.io/docs/start/) (1.32.0 or later)
108+
109+
Ensure virtualization is enabled on your system (e.g., Hyper-V, VirtualBox, or Docker driver installed).
110+
111+
#### 2. Start a Minikube Cluster with 2 Nodes
112+
113+
Start Minikube with 2 nodes using:
114+
115+
```
116+
minikube start --nodes=2
117+
```
118+
119+
**Optional (for WSL/Windows users):** Start Minikube with Docker driver and custom resources:
120+
121+
```
122+
minikube start --nodes=2 --driver=docker --cpus=2 --memory=2200
123+
```
124+
125+
You can verify the nodes are running with:
126+
127+
```
128+
kubectl get nodes
129+
```
130+
131+
#### 3. Deploy the Application
132+
Navigate to the root of the project and apply the Kubernetes manifests:
133+
134+
```
135+
kubectl apply -f kubernetes/
136+
```
137+
This will create:
138+
139+
1. Deployments for frontend and backend
140+
141+
2. Services to expose them
142+
143+
3. Horizontal Pod Autoscalers (HPA)
144+
145+
4. (Optional) Vertical Pod Autoscalers (VPA), if CRDs are installed
146+
147+
#### 4. Access the Application
148+
Expose the frontend service using Minikube:
149+
150+
```
151+
minikube service frontend-service
152+
```
153+
154+
This will open the app in your default browser.
155+
100156
## Using the Application
101157

102158
![Screenshot (768)](https://github.com/aayushxrj/gochat/assets/111623667/6beaf96f-7362-47e7-927e-d4cb9c4ef84b)

0 commit comments

Comments
 (0)