谢谢你的时间,
我的家庭实验室中运行着一个主从 Microk8s 集群。我的构建文档在这里;GitHub
运行时没有出现任何错误sudo microk8s.inspect
我甚至无法启动一个简单的容器,否则它会进入 crashloopbackoff
sudo microk8s.kubectl run http --image=katacoda/docker-http-server:latest
下面的 Pod 描述;
ubuntu@MasterControl:~$ sudo microk8s.kubectl describe pod/http
Name: http
Namespace: default
Priority: 0
Node: mastercontrol/192.168.123.10
Start Time: Wed, 22 Apr 2020 15:33:41 +0000
Labels: run=http
Annotations: <none>
Status: Running
IP: 10.1.39.13
IPs:
IP: 10.1.39.13
Containers:
http:
Container ID: containerd://2cb60ab4a7c25775b0b2acd5320145bf8b0f491b12fdeb32e879a68f18eb492f
Image: katacoda/docker-http-server:latest
Image ID: docker.io/katacoda/docker-http-server@sha256:76dc8a47fd019f80f2a3163aba789faf55b41b2fb06397653610c754cb12d3ee
Port: <none>
Host Port: <none>
State: Waiting
Reason: CrashLoopBackOff
Last State: Terminated
Reason: Error
Exit Code: 1
Started: Wed, 22 Apr 2020 15:33:46 +0000
Finished: Wed, 22 Apr 2020 15:33:46 +0000
Ready: False
Restart Count: 1
Environment: <none>
Mounts:
/var/run/secrets/kubernetes.io/serviceaccount from default-token-j9x8g (ro)
Conditions:
Type Status
Initialized True
Ready False
ContainersReady False
PodScheduled True
Volumes:
default-token-j9x8g:
Type: Secret (a volume populated by a Secret)
SecretName: default-token-j9x8g
Optional: false
QoS Class: BestEffort
Node-Selectors: <none>
Tolerations: node.kubernetes.io/not-ready:NoExecute for 300s
node.kubernetes.io/unreachable:NoExecute for 300s
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled <unknown> default-scheduler Successfully assigned default/http to mastercontrol
Normal Created 15s (x2 over 18s) kubelet, mastercontrol Created container http
Normal Started 15s (x2 over 17s) kubelet, mastercontrol Started container http
Warning BackOff 13s (x2 over 14s) kubelet, mastercontrol Back-off restarting failed container
Normal Pulling 1s (x3 over 19s) kubelet, mastercontrol Pulling image "katacoda/docker-http-server:latest"
Normal Pulled 1s (x3 over 18s) kubelet, mastercontrol Successfully pulled image "katacoda/docker-http-server:latest"
非常感谢您的帮助,但我很想知道我错在哪里!
答案1
我将保留这个,以防有人遇到同样的问题。问题是我试图在 arm64 架构上运行 x86 容器。这绝对是新手的错误,但这就是我购买 pi 的原因!