paulbouwer / hello-kubernetes Goto Github PK
View Code? Open in Web Editor NEWProvides a demo app to deploy to a Kubernetes cluster. It displays a message, the name of the pod and details of the node it's deployed to.
License: MIT License
Provides a demo app to deploy to a Kubernetes cluster. It displays a message, the name of the pod and details of the node it's deployed to.
License: MIT License
When I run kubectl get services
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
hello-kubernetes LoadBalancer 10.100.179.79 <pending> 80:30607/TCP 37m
and not have any errors in events service
edit :
I change the type of service from LoadBalancer to NodePort because I run cluster on-prem. not support type LoadBalancer
Refer to: #1
Add examples for local and on-prem clusters that leverage NodePort instead of LoadBalancer.
is this one , how can i use it?
https://artifacthub.io/packages/helm/opsmx/hello-kubernetes
Might need to use parseInt such that it gives a number to app.listen
Hi, I've deployed hello-kubernetes to a 4 node raspberry pi k3s cluster and I'm getting the following output:
$ kubectl get service hello-kubernetes-custom
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
hello-kubernetes-custom LoadBalancer 10.43.27.83 <pending> 80:31288/TCP 13m
$ kubectl get pods
NAME READY STATUS RESTARTS AGE
svclb-hello-kubernetes-custom-snkgf 0/1 Pending 0 13m
svclb-hello-kubernetes-custom-f44xh 0/1 Pending 0 13m
svclb-hello-kubernetes-custom-cghph 0/1 Pending 0 13m
svclb-hello-kubernetes-custom-kfqgg 0/1 Pending 0 13m
hello-kubernetes-custom-6468f86645-x98pq 0/1 CrashLoopBackOff 7 13m
hello-kubernetes-custom-6468f86645-mv2q6 0/1 CrashLoopBackOff 7 13m
hello-kubernetes-custom-6468f86645-gvwcd 0/1 CrashLoopBackOff 7 13m
$ kubectl logs svclb-hello-kubernetes-custom-snkgf
$ kubectl logs hello-kubernetes-custom-6468f86645-x98pq
standard_init_linux.go:211: exec user process caused "exec format error"
What could I look at in order to find out what's going wrong?
Make the path of the Readiness and Liveness prob dynamically with the value of the pathPrefix of the helm chart like this :
livenessProbe:
httpGet:
path: /"{{ .Values.ingress.pathPrefix }}"
port: http
readinessProbe:
httpGet:
path: /"{{ .Values.ingress.pathPrefix }}"
port: http
the background-color
element for the body is close to the K8s image background, but slightly off. This is uncomfortable ๐ข
Current background is: #303030
and the K8s image has a background color of #333333
.
Failed to build this image using Kaniko. It's unhappy parsing the '
character in the word it's
.
error building image: error building stage: failed to process "Provides a demo image to deploy to a Kubernetes cluster. It displays a message, the name of the pod and details of the node it's deployed to.": unexpected end of statement while looking for matching single-quote
Will raise a quick PR to escape this character and link it to this issue ๐
Hi! I really love this project, I always use this project as an example when I show how Kubernetes could do to my friends. With a simple kubectl apply -f <link>
I could raise some instances of an application, that's awesome.
But after using helm, there are more steps to do and more concepts to introduce, so I think providing a single file manifest might be better.
I think helm template
could render that single file manifest without modifying anything already existing.
After trying this out (as a very new-to-Kubernetes person) I had a lot of trouble figuring out how to remove it again.
Eventually this worked for me:
kubectl delete deployment hello-kubernetes-hello-world -n hello-kubernetes
Would be great if the README covered this!
Hello,
The ingress example isn't working because now the api used is the networking v1 and the syntax doesn't seem to be recognized
Tested with GKE 1.21.5
Thank you.
Name: hello-kubernetes-ingress
Namespace: hello-kubernetes
Address:
Default backend: default-http-backend:80 (10.20.0.7:8080)
TLS:
hello-prod terminates XXXXXXXXXXX
Rules:
Host Path Backends
---- ---- --------
*
/hello-world(/|$)(.*) hello-kubernetes-hello-world:80 (10.20.0.31:8080,10.20.1.30:8080)
Annotations: acme.cert-manager.io/http01-edit-in-place: true
cert-manager.io/cluster-issuer: letsencrypt
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/rewrite-target: /$2
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning Rejected <invalid> nginx-ingress-controller hello-kubernetes/hello-kubernetes-ingress was rejected: with error: spec.rules[0].host: Required value
Warning Rejected <invalid> nginx-ingress-controller hello-kubernetes/hello-kubernetes-ingress was rejected: with error: spec.rules[0].host: Required value
Warning Rejected <invalid> nginx-ingress-controller spec.rules[0].host: Required value
Warning Rejected <invalid> nginx-ingress-controller spec.rules[0].host: Required value
This and this - the leading slash in the template causes this to occur when RENDER_PATH_PREFIX
is undefined and the context root of the application is not /
(e.g. this container is deployed to a path behind a LB on a route):
I suggest adding the slash at the end of the injected env var here:
hello-kubernetes/src/app/server.js
Line 22 in 6e9ac0e
Hello.
I tried to build my own docker image of hello-kubernetes
but it failed with the following:
pruzicka@peru:/tmp$ git clone https://github.com/paulbouwer/hello-kubernetes.git
Cloning into 'hello-kubernetes'...
remote: Enumerating objects: 47, done.
remote: Total 47 (delta 0), reused 0 (delta 0), pack-reused 47
Unpacking objects: 100% (47/47), done.
pruzicka@peru:/tmp$ cd hello-kubernetes/
pruzicka@peru:/tmp/hello-kubernetes$ docker build --no-cache --build-arg IMAGE_VERSION="1.5" --build-arg IMAGE_CREATE_DATE="`date -u +"%Y-%m-%dT%H:%M:%SZ"`" --build-arg IMAGE_SOURCE_REVISION="`git rev-parse HEAD`" -f Dockerfile -t "hello-kubernetes:1.5" .
STEP 1: FROM node:8.1.0-alpine
STEP 2: ARG IMAGE_CREATE_DATE
--> e2b7778e11159a7e1424b87c84ca8d27a237858623843af3e8a397a7020d0931
STEP 3: FROM e2b7778e11159a7e1424b87c84ca8d27a237858623843af3e8a397a7020d0931
STEP 4: ARG IMAGE_VERSION
--> e46d921f61fc5e811ce82df8e59034bce4b54969dfc8af33b967f0048efe9702
STEP 5: FROM e46d921f61fc5e811ce82df8e59034bce4b54969dfc8af33b967f0048efe9702
STEP 6: ARG IMAGE_SOURCE_REVISION
--> 1fd41214b517592d27f59fbf15adcc026330d3762e40d17c1aed3388817ef155
STEP 7: FROM 1fd41214b517592d27f59fbf15adcc026330d3762e40d17c1aed3388817ef155
STEP 8: LABEL org.opencontainers.image.title="Hello Kubernetes!" org.opencontainers.image.description="Provides a demo image to deploy to a Kubernetes cluster. It displays a message, the name of the pod and details of the node it's deployed to." org.opencontainers.image.created=$IMAGE_CREATE_DATE org.opencontainers.image.version=$IMAGE_VERSION org.opencontainers.image.authors="Paul Bouwer" org.opencontainers.image.url="https://hub.docker.com/r/paulbouwer/hello-kubernetes/" org.opencontainers.image.documentation="https://github.com/paulbouwer/hello-kubernetes/README.md" org.opencontainers.image.vendor="Paul Bouwer" org.opencontainers.image.licenses="MIT" org.opencontainers.image.source="https://github.com/paulbouwer/hello-kubernetes.git" org.opencontainers.image.revision=$IMAGE_SOURCE_REVISION
--> d74196ebbc209a93d1b4c947201f03e22f1a577da1ebceaab20b33747fde3d63
STEP 9: FROM d74196ebbc209a93d1b4c947201f03e22f1a577da1ebceaab20b33747fde3d63
STEP 10: RUN mkdir -p /usr/src/app
--> 1bff185a722521479a48a5096323f28cc3f6c526da0925e9a1451cd899bbd110
STEP 11: FROM 1bff185a722521479a48a5096323f28cc3f6c526da0925e9a1451cd899bbd110
STEP 12: WORKDIR /usr/src/app
--> 7a406bc68e4ec7cb316cf727702002f32b6a53b32c9717ebc21d3466722f0145
STEP 13: FROM 7a406bc68e4ec7cb316cf727702002f32b6a53b32c9717ebc21d3466722f0145
STEP 14: COPY package.json /usr/src/app/
--> 1d344902b0e799ad643b0f50764ecf47c3874fd32b5ade8aac547f32e4fcdc45
STEP 15: FROM 1d344902b0e799ad643b0f50764ecf47c3874fd32b5ade8aac547f32e4fcdc45
STEP 16: RUN npm install
npm info it worked if it ends with ok
npm info using [email protected]
npm info using [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm http fetch GET 200 https://registry.npmjs.org/morgan 192ms
npm http fetch GET 200 https://registry.npmjs.org/bytes 206ms
npm http fetch GET 200 https://registry.npmjs.org/express-handlebars 199ms
npm http fetch GET 200 https://registry.npmjs.org/express 207ms
npm http fetch GET 200 https://registry.npmjs.org/accepts 130ms
npm http fetch GET 200 https://registry.npmjs.org/bytes/-/bytes-2.5.0.tgz 179ms
npm http fetch GET 200 https://registry.npmjs.org/array-flatten 145ms
npm http fetch GET 200 https://registry.npmjs.org/body-parser 151ms
npm http fetch GET 200 https://registry.npmjs.org/content-disposition 152ms
npm http fetch GET 200 https://registry.npmjs.org/content-type 154ms
npm http fetch GET 200 https://registry.npmjs.org/cookie-signature 158ms
npm http fetch GET 200 https://registry.npmjs.org/cookie 159ms
npm http fetch GET 200 https://registry.npmjs.org/depd 138ms
npm http fetch GET 200 https://registry.npmjs.org/debug 163ms
npm http fetch GET 200 https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz 82ms
npm http fetch GET 200 https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz 104ms
npm http fetch GET 200 https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz 107ms
npm http fetch GET 200 https://registry.npmjs.org/debug/-/debug-2.6.9.tgz 86ms
npm http fetch GET 200 https://registry.npmjs.org/depd/-/depd-1.1.2.tgz 97ms
npm http fetch GET 200 https://registry.npmjs.org/etag 57ms
npm http fetch GET 200 https://registry.npmjs.org/escape-html 62ms
npm http fetch GET 200 https://registry.npmjs.org/encodeurl 73ms
npm http fetch GET 200 https://registry.npmjs.org/fresh 68ms
npm http fetch GET 200 https://registry.npmjs.org/finalhandler 76ms
npm http fetch GET 200 https://registry.npmjs.org/merge-descriptors 46ms
npm http fetch GET 200 https://registry.npmjs.org/etag/-/etag-1.8.1.tgz 57ms
npm http fetch GET 200 https://registry.npmjs.org/on-finished 50ms
npm http fetch GET 200 https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz 61ms
npm http fetch GET 200 https://registry.npmjs.org/parseurl 56ms
npm http fetch GET 200 https://registry.npmjs.org/path-to-regexp 52ms
npm http fetch GET 200 https://registry.npmjs.org/methods 65ms
npm http fetch GET 200 https://registry.npmjs.org/proxy-addr 49ms
npm http fetch GET 200 https://registry.npmjs.org/qs 58ms
npm http fetch GET 200 https://registry.npmjs.org/range-parser 79ms
npm http fetch GET 200 https://registry.npmjs.org/safe-buffer 74ms
npm http fetch GET 200 https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz 82ms
npm http fetch GET 200 https://registry.npmjs.org/send 75ms
npm http fetch GET 200 https://registry.npmjs.org/serve-static 75ms
npm http fetch GET 200 https://registry.npmjs.org/statuses 81ms
npm http fetch GET 200 https://registry.npmjs.org/setprototypeof 91ms
npm http fetch GET 200 https://registry.npmjs.org/type-is 75ms
npm http fetch GET 200 https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz 76ms
npm http fetch GET 200 https://registry.npmjs.org/utils-merge 80ms
npm http fetch GET 200 https://registry.npmjs.org/vary 103ms
npm http fetch GET 200 https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz 85ms
npm http fetch GET 200 https://registry.npmjs.org/glob 95ms
npm http fetch GET 200 https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz 99ms
npm http fetch GET 200 https://registry.npmjs.org/graceful-fs 94ms
npm http fetch GET 200 https://registry.npmjs.org/object.assign 55ms
npm http fetch GET 200 https://registry.npmjs.org/handlebars 66ms
npm http fetch GET 200 https://registry.npmjs.org/promise 55ms
npm http fetch GET 200 https://registry.npmjs.org/basic-auth 54ms
npm http fetch GET 200 https://registry.npmjs.org/on-headers 58ms
npm http fetch GET 200 https://registry.npmjs.org/mime-types 35ms
npm http fetch GET 200 https://registry.npmjs.org/negotiator 64ms
npm http fetch GET 200 https://registry.npmjs.org/http-errors 51ms
npm http fetch GET 200 https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz 56ms
npm http fetch GET 200 https://registry.npmjs.org/raw-body 53ms
npm http fetch GET 200 https://registry.npmjs.org/unpipe 48ms
npm http fetch GET 200 https://registry.npmjs.org/ms 52ms
npm http fetch GET 200 https://registry.npmjs.org/forwarded 38ms
npm http fetch GET 200 https://registry.npmjs.org/ee-first 50ms
npm http fetch GET 200 https://registry.npmjs.org/ipaddr.js 60ms
npm http fetch GET 200 https://registry.npmjs.org/destroy 58ms
npm http fetch GET 200 https://registry.npmjs.org/ms/-/ms-2.0.0.tgz 66ms
npm http fetch GET 200 https://registry.npmjs.org/media-typer 37ms
npm http fetch GET 200 https://registry.npmjs.org/iconv-lite 142ms
npm http fetch GET 200 https://registry.npmjs.org/mime 50ms
npm http fetch GET 200 https://registry.npmjs.org/fs.realpath 57ms
npm http fetch GET 200 https://registry.npmjs.org/inflight 70ms
npm http fetch GET 200 https://registry.npmjs.org/inherits 65ms
npm http fetch GET 200 https://registry.npmjs.org/minimatch 99ms
npm http fetch GET 200 https://registry.npmjs.org/once 85ms
npm http fetch GET 200 https://registry.npmjs.org/mime/-/mime-1.4.1.tgz 82ms
npm http fetch GET 200 https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz 119ms
npm http fetch GET 200 https://registry.npmjs.org/path-is-absolute 136ms
npm http fetch GET 200 https://registry.npmjs.org/define-properties 99ms
npm http fetch GET 200 https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz 82ms
npm http fetch GET 200 https://registry.npmjs.org/function-bind 87ms
npm http fetch GET 200 https://registry.npmjs.org/has-symbols 83ms
npm http fetch GET 200 https://registry.npmjs.org/object-keys 82ms
npm http fetch GET 200 https://registry.npmjs.org/neo-async 54ms
npm http fetch GET 200 https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz 50ms
npm http fetch GET 200 https://registry.npmjs.org/source-map 54ms
npm http fetch GET 200 https://registry.npmjs.org/optimist 65ms
npm http fetch GET 200 https://registry.npmjs.org/asap 47ms
npm http fetch GET 200 https://registry.npmjs.org/uglify-js 68ms
npm http fetch GET 200 https://registry.npmjs.org/mime-db 81ms
npm http fetch GET 200 https://registry.npmjs.org/wrappy 67ms
npm http fetch GET 200 https://registry.npmjs.org/safer-buffer 108ms
npm http fetch GET 200 https://registry.npmjs.org/minimist 92ms
npm http fetch GET 200 https://registry.npmjs.org/wordwrap 108ms
npm http fetch GET 200 https://registry.npmjs.org/brace-expansion 124ms
npm http fetch GET 200 https://registry.npmjs.org/commander 99ms
npm http fetch GET 200 https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz 174ms
npm http fetch GET 200 https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz 25ms
npm http fetch GET 200 https://registry.npmjs.org/concat-map 28ms
npm http fetch GET 200 https://registry.npmjs.org/balanced-match 40ms
npm http fetch GET 200 https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz 138ms
npm http fetch GET 200 https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz 299ms
npm http fetch GET 200 https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz 299ms
npm http fetch GET 200 https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz 294ms
npm http fetch GET 200 https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz 307ms
npm http fetch GET 200 https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.0.tgz 315ms
npm http fetch GET 200 https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz 317ms
npm http fetch GET 200 https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz 336ms
npm http fetch GET 200 https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz 341ms
npm http fetch GET 200 https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz 345ms
npm http fetch GET 200 https://registry.npmjs.org/commander/-/commander-2.20.0.tgz 347ms
npm http fetch GET 200 https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz 346ms
npm http fetch GET 200 https://registry.npmjs.org/asap/-/asap-2.0.6.tgz 349ms
npm http fetch GET 200 https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz 343ms
npm http fetch GET 200 https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz 343ms
npm http fetch GET 200 https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz 347ms
npm http fetch GET 200 https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz 348ms
npm http fetch GET 200 https://registry.npmjs.org/methods/-/methods-1.1.2.tgz 350ms
npm http fetch GET 200 https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz 352ms
npm http fetch GET 200 https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz 353ms
npm http fetch GET 200 https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz 348ms
npm http fetch GET 200 https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz 354ms
npm http fetch GET 200 https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz 356ms
npm http fetch GET 200 https://registry.npmjs.org/neo-async/-/neo-async-2.6.0.tgz 355ms
npm http fetch GET 200 https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz 357ms
npm http fetch GET 200 https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz 367ms
npm http fetch GET 200 https://registry.npmjs.org/promise/-/promise-8.0.3.tgz 366ms
npm http fetch GET 200 https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz 375ms
npm http fetch GET 200 https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz 382ms
npm http fetch GET 200 https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz 381ms
npm http fetch GET 200 https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz 378ms
npm http fetch GET 200 https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz 383ms
npm http fetch GET 200 https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz 395ms
npm http fetch GET 200 https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.5.tgz 408ms
npm http fetch GET 200 https://registry.npmjs.org/qs/-/qs-6.5.2.tgz 402ms
npm http fetch GET 200 https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz 94ms (from cache)
npm http fetch GET 200 https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz 94ms (from cache)
npm http fetch GET 200 https://registry.npmjs.org/depd/-/depd-1.1.2.tgz 95ms (from cache)
npm http fetch GET 200 https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz 94ms (from cache)
npm http fetch GET 200 https://registry.npmjs.org/etag/-/etag-1.8.1.tgz 94ms (from cache)
npm http fetch GET 200 https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz 95ms (from cache)
npm http fetch GET 200 https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz 94ms (from cache)
npm http fetch GET 200 https://registry.npmjs.org/mime/-/mime-1.4.1.tgz 94ms (from cache)
npm http fetch GET 200 https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz 105ms (from cache)
npm http fetch GET 200 https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz 101ms (from cache)
npm http fetch GET 200 https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz 102ms (from cache)
npm http fetch GET 200 https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz 100ms (from cache)
npm http fetch GET 200 https://registry.npmjs.org/ms/-/ms-2.0.0.tgz 101ms (from cache)
npm http fetch GET 200 https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz 63ms (from cache)
npm http fetch GET 200 https://registry.npmjs.org/debug/-/debug-2.6.9.tgz 158ms
npm WARN [email protected] No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/escape-html):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, chown '/usr/src/app/node_modules/.staging/escape-html-19e422e3/index.js'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fs.realpath):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, chown '/usr/src/app/node_modules/.staging/fs.realpath-3a55e89b/LICENSE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/commander):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, chmod '/usr/src/app/node_modules/.staging/commander-fac8632f/index.js'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/promise):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, open '/usr/src/app/node_modules/.staging/promise-259b0227/core.js'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/forwarded):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: EEXIST: file already exists, mkdir '/usr/src/app/node_modules/.staging/forwarded-d3060e18'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: File exists: /usr/src/app/node_modules/.staging/forwarded-d3060e18
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fresh):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, open '/usr/src/app/node_modules/.staging/fresh-a5e59a9e/index.js'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/proxy-addr):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: EEXIST: file already exists, mkdir '/usr/src/app/node_modules/.staging/proxy-addr-f1ed8e03'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: File exists: /usr/src/app/node_modules/.staging/proxy-addr-f1ed8e03
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/qs):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: EEXIST: file already exists, mkdir '/usr/src/app/node_modules/.staging/qs-e6c3fcbe'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: File exists: /usr/src/app/node_modules/.staging/qs-e6c3fcbe
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/object.assign):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, open '/usr/src/app/node_modules/.staging/object.assign-663fd3ff/auto.js'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/function-bind):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, open '/usr/src/app/node_modules/.staging/function-bind-bb6ddbb5/LICENSE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/parseurl):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, open '/usr/src/app/node_modules/.staging/parseurl-16e134eb/LICENSE'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/cookie):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, open '/usr/src/app/node_modules/.staging/cookie-a49deb4e/index.js'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/asap):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, open '/usr/src/app/node_modules/.staging/asap-cefcd946/browser-asap.js'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/mime-db):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, utime '/usr/src/app/node_modules/.staging/mime-db-2f461d15/db.json'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/define-properties):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, utime '/usr/src/app/node_modules/.staging/define-properties-a059d705/.travis.yml'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/balanced-match):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, chmod '/usr/src/app/node_modules/.staging/balanced-match-3704cf2b/LICENSE.md'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/concat-map):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, chmod '/usr/src/app/node_modules/.staging/concat-map-224ae118/README.markdown'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/cookie-signature):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, chmod '/usr/src/app/node_modules/.staging/cookie-signature-33da35d7/Readme.md'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/accepts):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, chmod '/usr/src/app/node_modules/.staging/accepts-1f775a13/README.md'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/object-keys):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: EEXIST: file already exists, mkdir '/usr/src/app/node_modules/.staging/object-keys-4605d883'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: File exists: /usr/src/app/node_modules/.staging/object-keys-4605d883
npm ERR! path /usr/src/app/node_modules/.staging/content-type-2bcca7b5
npm ERR! code EINVAL
npm ERR! errno -22
npm ERR! syscall chown
npm ERR! EINVAL: invalid argument, chown '/usr/src/app/node_modules/.staging/content-type-2bcca7b5'
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2019-05-06T11_21_24_423Z-debug.log
Error: error building at step {Env:[PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin NPM_CONFIG_LOGLEVEL=info NODE_VERSION=8.1.0 YARN_VERSION=0.24.6 IMAGE_SOURCE_REVISION=ec9d94923148f2a6bf99b725fc9f4e9acb260e3c IMAGE_VERSION=1.5 IMAGE_CREATE_DATE=2019-05-06T11:21:04Z] Command:run Args:[npm install] Flags:[] Attrs:map[] Message:RUN npm install Original:RUN npm install}: error while running runtime: exit status 234
Any idea how to fix it?
Thank you...
In our company's internally managed k8s platform the policy runAsNonRoot
is set and this causes the deployment to fail with
Error: container has runAsNonRoot and image has non-numeric user (node), cannot verify user is non-root
After editing deployment.yaml
and inserting this
securityContext:
runAsUser: 1000
runAsGroup: 1000
in
the chart could be installed successfully.Update the base image to cater for the following CVEs:
Remediation:
In the Develop Application section of the readme.md
, you say to run the app with npm start
.. It looks like in the Dockerfile you use yarn
instead.. To avoid bundling the app with both yarn
and npm
I'd recommend to change the phrase in the Develop Application section from:
If you run
npm start
in the app
To
If you run
yarn start
in the app
When I applied your .yaml to my two node cluster (one master, one worker) the external-ip stays in Here's the service and pod:
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
hello-kubernetes LoadBalancer 10.110.156.22 80:30210/TCP 18m
$ kubectl get pods
NAME READY STATUS RESTARTS AGE
hello-kubernetes-594f6f475f-4s9nw 1/1 Running 0 18m
hello-kubernetes-594f6f475f-7zb4h 1/1 Running 0 28s
hello-kubernetes-594f6f475f-jlrwb 1/1 Running 0 28s
Browser requests to port 30210 on either host is successful, but I should still be able to get an external-ip to connect on port 8080.
Do I need to change something in the .yaml to run on my two node cluster?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.