This is a sample code that uses Minikube to deploy React locally on kubernetes.
MIT License
This is a sample code that uses Docker Desktop to deploy React locally on kubernetes.
% cp .env.example .env.local
# Edit your account info.
% vim .env.local
# Build docker image and push to your registry.
% ./push-to-registry.sh
# Edit manifest file line 17. Update the value of the key `spec.template.spec.containers[0].image` with your account name.
% vim ./deployment-service.yaml
You can use public sample image of this repository owner. The sample code is designed to use it, so there is no particular change.
# Dry run
% kubectl apply --filename ./k8s/deployment-service.yaml \
--dry-run=client
# Apply
% kubectl apply --filename ./k8s/deployment-service.yaml
# Check
% kubectl get all | grep -v kubernetes
The browser opened automatically and displayed the default React application.
% kubectl delete --filename ./k8s/deployment-service.yaml