@@ -113,27 +113,115 @@ The Spreadsheet Application is a modern web-based solution for managing sales da
113113
1141143 . ** Access Application**
115115 Open http://localhost:5000 in your browser
116+
117+ Note: Make sure Redis server is running and the application has started successfully. You should see the login page when accessing the URL.
116118
117119#### EKS Deployment
118120
1191211 . ** Configure AWS CLI**
120122 ``` bash
121123 aws configure
124+ # Enter your AWS Access Key ID
125+ # Enter your AWS Secret Access Key
126+ # Enter your default region (e.g., us-west-2)
127+ # Enter your preferred output format (json)
122128 ```
123129
1241302 . ** Create EKS Cluster**
125131 ``` bash
126- eksctl create cluster --name spreadsheet-app --region your-region --nodegroup-name standard-workers --node-type t3.medium --nodes 3 --nodes-min 1 --nodes-max 4 --managed
132+ # Create cluster using the provided configuration
133+ eksctl create cluster -f kubernetes/eks-cluster.yaml
134+
135+ # Verify cluster creation
136+ eksctl get cluster --name spreadsheet-app-cluster --region us-west-2
127137 ```
128138
129- 3 . ** Deploy Application **
139+ 3 . ** Update kubeconfig **
130140 ``` bash
131- kubectl apply -f kubernetes/
141+ # Update kubeconfig to connect to your cluster
142+ aws eks update-kubeconfig --name spreadsheet-app-cluster --region us-west-2
143+
144+ # Verify connection
145+ kubectl config current-context
132146 ```
133147
134- 4 . ** Access Application**
148+ 4 . ** Deploy Application**
135149 ``` bash
136- kubectl get svc spreadsheet-app-service
150+ # Create namespace
151+ kubectl create namespace spreadsheet-app
152+
153+ # Deploy Redis
154+ kubectl apply -f kubernetes/redis.yaml
155+
156+ # Deploy main application
157+ kubectl apply -f kubernetes/deployment.yaml
158+
159+ # Deploy ingress (if needed)
160+ kubectl apply -f kubernetes/ingress.yaml
161+ ```
162+
163+ 5 . ** Monitor Deployment**
164+ ``` bash
165+ # Check pod status
166+ kubectl get pods -n spreadsheet-app
167+
168+ # Check service status
169+ kubectl get svc -n spreadsheet-app
170+
171+ # View application logs
172+ kubectl logs -n spreadsheet-app deployment/spreadsheet-app
173+ ```
174+
175+ 6 . ** Access Application**
176+ There are multiple ways to access your application in EKS:
177+
178+ a. ** Using LoadBalancer (Recommended for Production)**
179+ ``` bash
180+ # Get the LoadBalancer URL
181+ kubectl get svc spreadsheet-app-service -n spreadsheet-app -o jsonpath=' {.status.loadBalancer.ingress[0].hostname}'
182+ ```
183+ The application will be available at: ` http://<loadbalancer-url> `
184+ - This URL is publicly accessible
185+ - It may take a few minutes for the LoadBalancer to be fully provisioned
186+ - The URL remains stable unless you delete and recreate the service
187+
188+ b. ** Using Port Forwarding (For Development/Testing)**
189+ ``` bash
190+ # Forward local port 8080 to service port 80
191+ kubectl port-forward -n spreadsheet-app svc/spreadsheet-app-service 8080:80
192+ ```
193+ Then access the application at: ` http://localhost:8080 `
194+ - This method is useful for local testing
195+ - The connection will be terminated when you stop the port-forward command
196+ - Only accessible from your local machine
197+
198+ c. ** Using Ingress (If configured)**
199+ ``` bash
200+ # Get the ingress host
201+ kubectl get ingress -n spreadsheet-app
202+ ```
203+ Access the application using the hostname from the ingress
204+ - Requires proper DNS configuration
205+ - Supports custom domains and SSL
206+ - More suitable for production environments
207+
208+ Note:
209+ - The application might take a few minutes to be fully accessible after deployment
210+ - If you can't access the application, check the troubleshooting section
211+ - For security in production, consider setting up HTTPS and proper authentication
212+
213+ 7 . ** Troubleshooting**
214+ - If pods are not starting, check logs: ` kubectl logs -n spreadsheet-app <pod-name> `
215+ - If service is not accessible, verify LoadBalancer status: ` kubectl describe svc spreadsheet-app-service -n spreadsheet-app `
216+ - For memory issues, check pod status: ` kubectl describe pod -n spreadsheet-app -l app=spreadsheet-app `
217+
218+ 8 . ** Scaling and Updates**
219+ ``` bash
220+ # Scale the application
221+ kubectl scale deployment spreadsheet-app -n spreadsheet-app --replicas=3
222+
223+ # Update the application
224+ kubectl set image deployment/spreadsheet-app spreadsheet-app=your-new-image:tag -n spreadsheet-app
137225 ```
138226
139227## Project Structure
0 commit comments