Install the app using:
npm install
Run the app using:
npm run start
Connect by going to:
docker build -t clintomed/hello-kubernetes:0.1.0 .
docker run -p 3000:3000 -d hello-kubernetes
docker push clintomed/hello-kubernetes:0.1.0
For these instructions I used kind. Make sure you have pushed the Docker image.
kind create cluster
- Go into
kubernetes-yaml/deployments/hello-kubernetes.deployment.yaml
and change the spec.template.spec to use the image you pushed to Docker Hub. - Run
k apply -f kubernetes-yaml/deployments/hello-kubernetes.deployment.yaml
- Run
k apply -f kubernetes-yaml/services/service-definition.yaml
- Run
kubectl port-forward service/myapp-service 3003:3000
to expose port 3000 on your node to port 3003 on your host. - Go to http://localhost:3003/
- Create a new folder called helm
- Initialize helm using
helm create node-kubernetes
- In the
deployment.yaml
file in thetemplates
folder, change thecontainerPort
to3000
. - In the
Chart.yaml
change the theappVersion
to the version of the docker container you want to deploy, for example0.1.0
. - In the
values.yaml
file, change theimage.repository
toclintomed/hello-kubernetes
. Changeservice.type
toNodePort
andservice.port
to3000
. Changeingress.enabled
totrue
.