![](/img/trans.png)
[英]Can we run an application that is configured to run on multi-node AWS EC2 K8s cluster using kops into local kubernetes cluster (using kubeadm)?
[英]Why can't deploy containers on k8s cluster on AWS EC2 correctly?
当我使用AWS EC2部署k8s集群时,在其上部署测试容器:
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: app-deployment-test
spec:
replicas: 2
template:
metadata:
labels:
app: app-test
tier: frontend
spec:
containers:
- name: app
image: ubuntu
ports:
- containerPort: 80
imagePullPolicy: Always
得到
Back-off restarting failed container
Error syncing pod
吊舱错误。 当描述特殊的pod时: kubectl describe pod app-deployment-test-ccddf7bcc-dqltq
,在输出kubectl describe pod app-deployment-test-ccddf7bcc-dqltq
得到了以下消息:
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 41s default-scheduler Successfully assigned app-deployment-test-ccddf7bcc-dqltq to app-instance
Normal SuccessfulMountVolume 41s kubelet, app-instance MountVolume.SetUp succeeded for volume "default-token-zrf98"
Normal Pulling 14s (x3 over 40s) kubelet, app-instance pulling image "ubuntu"
Normal Pulled 12s (x3 over 32s) kubelet, app-instance Successfully pulled image "ubuntu"
Normal Created 12s (x3 over 31s) kubelet, app-instance Created container
Normal Started 11s (x3 over 31s) kubelet, app-instance Started container
Warning BackOff 11s (x3 over 27s) kubelet, app-instance Back-off restarting failed container
Warning FailedSync 11s (x3 over 27s) kubelet, app-instance Error syncing pod
失败的原因是什么?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.