This repository contains Kubernetes configurations for deployment of all Sympoll's apps and infrastructure. These configurations are tailored for deployment in Minikube.
-
Start Minikube with the desired Kubernetes version:
minikube start --kubernetes-version=v1.26.0
-
Enable the Ingress addon:
minikube addons enable ingress -
Start the Minikube tunnel to expose the Ingress service:
minikube tunnel
Leave this terminal open while using Ingress, as it needs to keep running to maintain the tunnel.
-
Apply the Kubernetes configurations:
kubectl apply -f frontend-and-poll-managment/
-
Verify that all pods are running:
kubectl get pods
-
Check the status of the services:
kubectl get services
-
Ensure the Ingress resource is created:
kubectl get ingress
-
To access the frontend, you can use Minikube’s IP and the service port:
minikube service frontend --url
-
Alternatively, if using Ingress, open a browser and navigate to
http://localhostto see the frontend.
-
Get Minikube IP:
minikube ip
-
Check logs of a specific pod:
kubectl logs <pod-name>
-
Execute a command inside a container:
kubectl exec -it <pod-name> -- /bin/sh
-
Delete all resources:
kubectl delete -f frontend-and-poll-managment/
-
Update the deployment:
kubectl rollout restart deployment <deployment-name>
-
View detailed events for debugging:
kubectl get events
- Ensure your
ConfigMapfor initializing PostgreSQL is correctly referenced in your PostgreSQL deployment. - Verify that your Ingress controller is correctly routing traffic to the services.
- Pods not starting: Check the logs using
kubectl logs <pod-name>andkubectl describe pod <pod-name>for more details. - Service not accessible: Ensure that the service is correctly configured and that the Ingress controller is properly set up.
Feel free to adjust configurations according to your needs.