This project was bootstrapped with Create React App.
Installs all the dependencies.
npm installRuns the application locally.
npm startBuild the application to .\build directory.
npm run buildBuild image from Dockerfile and apply appropriate version tag. The new image would get latest tag.
docker build -t plannerapp:<version> -t plannerapp:latest .Create the container using latest image and map ports from 80 on container to targetPort.
docker run --name plannerapp -p <targetPort>:80 --rm plannerapp:latestCreate a container and map shell to terminal.
docker run --name plannerapp -p <targetPort>:80 --rm -it plannerapp:latest /bin/shMap shell to terminal of a running container.
docker exec -it plannerapp shClone the image with Docker Registry Name.
docker tag plannerapp:latest <DockerRegistryName>/plannerapp:latestPush the image to Docker Registry
docker push <DockerRegistryName>/plannerapp:latestGet the logs from the container. Argument -f is used to follow the logs and would reflect updates from the container.
docker container logs -f plannerappCreate the Nginx Ingress Controller using Helm in a new namespace.
kubectl create namespace ingress-nginx
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm install ingress-nginx ingress-nginx/ingress-nginx -n ingress-nginx --set controller.replicaCount=2Deploy the application which creates a deployment and a service. Uses a new namespace plannerapp for the deployment.
kubectl apply -f .\manifests\plannerapp.yaml -n plannerappDeploy the ingress rules on the new namespace plannerapp which uses the Nginx Ingress Controller previously deployed.
kubectl apply -f .\manifests\ingress.yaml -n plannerappMap running pod shell to the terminal. Use kubectl get pods to get the pod name.
kubectl exec --stdin --tty <pod-name> -n plannerapp -- shGet the logs of the ingress controller for debugging server failures.
kubectl logs -n ingress-nginx <ingress-controller-pod>