express
$ npm install express --save
Build the container on your local machine with:
$ docker build -t {DOCKER_USERNAME}/helloworld-nodejs
$ docker push {DOCKER_USERNAME}/helloworld-nodejs
$ kubectl apply -f service.yaml
curl -H "Host: helloworld-nodejs.default.example.com" http://localhost Hello Node.js Sample v1!
$ kubectl get pods helloworld-nodejs-00001-deployment-69f788f64b-gtvrc -o yaml
$ kubectl logs helloworld-nodejs-00001-deployment-69f788f64b-gtvrc --all-containers=true
$ kubectl logs helloworld-nodejs-00001-deployment-69f788f64b-gtvrc -c user-container > knative-serving-helloworld-nodejs@1.0.0 start /usr/src/app > node app.js Hello world listening on port 8080 Hello world received a request.
$ kubectl logs helloworld-nodejs-00001-deployment-69f788f64b-gtvrc -c istio-init
kubectl exec nodejs-10-action-00003-deployment-65cd48975b-kbkwj -c istio-proxy -- ls -l kubectl exec nodejs-10-action-00003-deployment-65cd48975b-kbkwj -c istio-proxy -- curl localhost:8080