【发布时间】:2021-02-22 14:06:23
【问题描述】:
我正在为 pilosa 准备舵图。安装图表后(或在创建部署时), pilosa pod 进入 CrashLoopBackOff。
这是为 k8s 部署渲染的 YAML 文件。
# Source: pilosa/templates/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: RELEASE-NAME-pilosa
labels:
helm.sh/chart: pilosa-0.1.0
app.kubernetes.io/name: pilosa
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/version: "1.16.0"
app.kubernetes.io/managed-by: Helm
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: pilosa
app.kubernetes.io/instance: RELEASE-NAME
template:
metadata:
labels:
app.kubernetes.io/name: pilosa
app.kubernetes.io/instance: RELEASE-NAME
spec:
imagePullSecrets:
- name: my-cr-secret
serviceAccountName: default
securityContext:
{}
initContainers:
- command:
- /bin/sh
- -c
- |
sysctl -w net.ipv4.tcp_keepalive_time=600
sysctl -w net.ipv4.tcp_keepalive_intvl=60
sysctl -w net.ipv4.tcp_keepalive_probes=3
image: busybox
name: init-sysctl
securityContext:
privileged: true
containers:
- name: pilosa
securityContext:
{}
image: "mycr.azurecr.io/pilosa:v1.4.0"
imagePullPolicy: IfNotPresent
command:
- server
- --data-dir
- /data
- --max-writes-per-request
- "20000"
- --bind
- http://pilosa:10101
- --cluster.coordinator=true
- --gossip.seeds=pilosa:14000
- --handler.allowed-origins="*"
ports:
- name: http
containerPort: 10101
protocol: TCP
livenessProbe:
httpGet:
path: /
port: http
readinessProbe:
httpGet:
path: /
port: http
volumeMounts:
- name: "pilosa-pv-storage"
mountPath: /data
resources:
{}
volumes:
- name: pilosa-pv-storage
persistentVolumeClaim:
claimName: pilosa-pv-claim
当检查我发现的原因时:
$ kubectl describe pod pilosa-57cb7b8764-knsmw
.
.
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 48s default-scheduler Successfully assigned default/pilosa-57cb7b8764-knsmw to 10.0.10.3
Normal Pulling 47s kubelet Pulling image "busybox"
Normal Pulled 45s kubelet Successfully pulled image "busybox"
Normal Created 45s kubelet Created container init-sysctl
Normal Started 45s kubelet Started container init-sysctl
Normal Pulling 45s kubelet Pulling image "mycr.azurecr.io/pilosa:v1.2.0"
Normal Pulled 15s kubelet Successfully pulled image "mycr.azurecr.io/pilosa:v1.2.0"
Normal Created 14s (x2 over 15s) kubelet Created container pilosa
Warning Failed 14s (x2 over 15s) kubelet Error: failed to start container "pilosa": Error response from daemon: OCI runtime create failed: container_linux.go:349: starting container process caused "exec: \"server\": executable file not found in $PATH": unknown
Normal Pulled 14s kubelet Container image "mycr.azurecr.io/pilosa:v1.2.0" already present on machine
Warning BackOff 10s kubelet Back-off restarting failed container
这意味着问题是它无法运行命令服务器:
Error: failed to start container "pilosa": Error response from daemon: OCI runtime create failed: container_linux.go:349: starting container process caused "exec: \"server\": executable file not found in $PATH": unknown
但该命令在此处指定的 pilosa 中可用:https://www.pilosa.com/docs/latest/installation/
谁能帮我找到解决办法?
【问题讨论】:
标签: kubernetes executable kubernetes-helm file-not-found pilosa