dkron
dkron copied to clipboard
Minikube K8s Pods not starting. starting container process caused: exec: "dkron": executable file not found in $PATH: unknown
Describe the bug I having issue running dkron in Kubernetes using Minicuke on mac.
To Reproduce Steps to reproduce the behavior:
Below deployment file.
apiVersion: apps/v1
kind: Deployment
metadata:
name: kcron-deployment
spec:
selector:
matchLabels:
app: dkron
replicas: 1
template:
metadata:
labels:
app: dkron
spec:
containers:
- name: kcronmaster
image: dkron/dkron
ports:
- containerPort: 8080
- containerPort: 8946
- containerPort: 6868
command: ["dkron"]
# command: ["dkron agent --server --log-level=debug --bootstrap-expect=1"]
# command: ["./opt/local/dkron/dkron --server --log-level=debug --bootstrap-expect=1"]
# args: ["--server --log-level=debug --bootstrap-expect=1"]
env:
- name: GODEBUG
value: netdns=go
resources:
requests:
memory: "512Mi"
cpu: "500m"
limits:
memory: "512Mi"
cpu: "500m"
Expected behavior Should have dkron service running
** Specifications:**
- OS: macOS BigSur 11.5.2 (20G95)
- minikube version: v1.22.0
- kubectl
Client Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.7", GitCommit:"1dd5338295409edcfff11505e7bb246f0d325d15", GitTreeState:"clean", BuildDate:"2021-01-13T13:23:52Z", GoVersion:"go1.15.5", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.2", GitCommit:"092fbfbf53427de67cac1e9fa54aaa09a28371d7", GitTreeState:"clean", BuildDate:"2021-06-16T12:53:14Z", GoVersion:"go1.16.5", Compiler:"gc", Platform:"linux/amd64"}
Additional context Got this below error in Kurbenetes (dashboard)
Error: failed to start container "kcronmaster": Error response from daemon: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "dkron": executable file not found in $PATH: unknown
Hi @victorcoder
I also have this issue using minikube version v1.22.0 on my macOS. Why do I use minikube instead of docker-compose on my local machine? Because of I am trying to reproduce issue #998. I want to create about 30 - 50 nodes and 200 jobs. Can someone help?
My kubectl version is like this.
Client Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.2", GitCommit:"092fbfbf53427de67cac1e9fa54aaa09a28371d7", GitTreeState:"clean", BuildDate:"2021-06-16T12:59:11Z", GoVersion:"go1.16.5", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.2", GitCommit:"092fbfbf53427de67cac1e9fa54aaa09a28371d7", GitTreeState:"clean", BuildDate:"2021-06-16T12:53:14Z", GoVersion:"go1.16.5", Compiler:"gc", Platform:"linux/amd64"}
My deployment.yml
apiVersion: apps/v1
kind: Deployment
metadata:
name: hsun-dkron
spec:
selector:
matchLabels:
app: hsun-dkron
template:
metadata:
labels:
app: hsun-dkron
spec:
containers:
- name: hsun-dkron
image: dkron/dkron:v3.1.4
resources:
limits:
memory: "128Mi"
cpu: "500m"
ports:
- containerPort: 8080
- containerPort: 8946
- containerPort: 6868
command: ["dkron", "agent", "--server", "--log-level=debug", "--bootstrap-expect=1", "--retry-join", "provider=k8s"]
Pod events: Events:
Type | Reason | Age | From | Message |
---|---|---|---|---|
Normal | Scheduled | 38m | default-scheduler | Successfully assigned default/hsun-dkron-648cd4f8bd-v5hvd to minikube |
Normal | Pulled | 36m (x5 over 38m) | kubelet | Container image "dkron/dkron:v3.1.4" already present on machine |
Normal | Created | 36m (x5 over 38m) | kubelet | Created container hsun-dkron |
Warning | Failed | 36m (x5 over 38m) | kubelet | Error: failed to start container "hsun-dkron": Error response from daemon: OCI runtime create failed: container_linux.go:367: starting container process caused: exec: "dkron": executable file not found in $PATH: unknown |
Warning | BackOff | 3m10s (x158 over 38m) | kubelet | Back-off restarting failed container |
command: ["./dkron"]
args:
- "agent"
...
shoud works
@jjsaunier It worked but pods are failing and restarting. Got this error Back-off restarting failed container
ok then read the container log to figured out