kubernetes-up-and-running / kuard

Demo app for Kubernetes Up and Running book
Apache License 2.0
1.56k stars 535 forks source link

The syntethic workload is not working using command line #37

Open eversonamancio opened 3 years ago

eversonamancio commented 3 years ago

I tried to simulate batch workers, using the synthetic workload of generating 4096 bit RSA keys through the command line but I got some error messages.

I can do the same simulation using the UI successfully.

I´m using the following command:

kubectl run -i oneshot --image=gcr.io/kuar-demo/kuard-amd64:blue --restart=OnFailure -- --keygen-enable --keygen-exit-on-complete --keygen-num-to-g en 10

Here are the events: Events: Type Reason Age From Message


Normal Scheduled 96s default-scheduler Successfully assigned default/oneshot to aks-nodepool1-11892983-1 Normal Pulled 7s (x5 over 95s) kubelet, aks-nodepool1-11892983-1 Container image "gcr.io/kuar-demo/kuard-amd64:blue" already present on machine Normal Created 7s (x5 over 95s) kubelet, aks-nodepool1-11892983-1 Created container oneshot Warning Failed 6s (x5 over 95s) kubelet, aks-nodepool1-11892983-1 Error: failed to start container "oneshot": Error response from daemon: OCI runtime create failed: container_linux.go:370: starting container process caused: exec: "--keygen-enable": executable file not found in $PATH: unknown Warning BackOff 1s (x8 over 93s) kubelet, aks-nodepool1-11892983-1 Back-off restarting failed container

garyrule commented 3 years ago

I ran into this as well. I found this link which also mentions the issue and the fix that worked for me.

Errata: https://www.oreilly.com/catalog/errataunconfirmed.csp?isbn=0636920043874 Fix:

Changing the image to "gcr.io/kuar-demo/kuard-amd64:1" seems to solve the issue.