Note
I assume needed programs (docker, kubernetes) are installed and configured properly (ingress).
For local setup of Kubernetes one can use minikube or
microk8s
# Build an image and run it:
docker build -t abc .
docker run -e PORT=8080 -it abc
# Or pass the PORT argument in build-time:
docker build --build-arg=PORT=8080 -t abc .
docker run -it abcdocker build -t abc .kubectl apply -f deployment.yaml -f service.yaml-
Set appropriate parameters in:
ingress.yaml: sethostto appropriate domain through which the service will be exposed to the world.
-
Apply:
kubectl apply -f ingress.yaml