0

在图像中创建 yaml 后:fernandoacorreia/ubuntu-14.04-oracle-java-1.7,pod 未运行

Kubernetes 版本(使用 kubectl 版本):1.5.2

环境:--ENV:K8S 1.5.2 DOCKER 1.13.1 OS UBUNTU16.04 --already pull image docker pull fernandoacorreia/ubuntu-14.04-oracle-java-1.7

发生了什么:

步骤1:

vi ubuntu_ora.yaml
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: ubuntu-ora
spec:
replicas: 1
template:
metadata:
labels:
app: ubuntu
spec:
containers:
- name: ununtu
image: fernandoacorreia/ubuntu-14.04-oracle-java-1.7
ports:
- containerPort: 80

第2步:

kubectl create -f ubuntu_ora.yaml

第三步:

openinstall@k8master:~$ kubectl get pods --all-namespaces|grep ubuntu-ora
NAMESPACE NAME READY STATUS RESTARTS AGE
default ubuntu-ora-4001744982-pvjwv 0/1 CrashLoopBackOff 1 10s

第4步:

kubectl describe pod ubuntu-ora-4001744982-pvjwv

事件:来自 SubObjectPath 类型原因消息的 FirstSeen LastSeen 计数

45s 45s 1 {default-scheduler } Normal Scheduled Successfully assigned ubuntu-ora-4001744982-pvjwv to k8node3
38s 38s 1 {kubelet k8node3} spec.containers{ununtu} Normal Created Created container with docker id 0c14684efe67; Security:[seccomp=unconfined]
38s 38s 1 {kubelet k8node3} spec.containers{ununtu} Normal Started Started container with docker id 0c14684efe67
36s 36s 1 {kubelet k8node3} spec.containers{ununtu} Normal Created Created container with docker id d0df08a7f2c9; Security:[seccomp=unconfined]
36s 36s 1 {kubelet k8node3} spec.containers{ununtu} Normal Started Started container with docker id d0df08a7f2c9
35s 34s 2 {kubelet k8node3} Warning FailedSync Error syncing pod, skipping: failed to "StartContainer" for "ununtu" with CrashLoopBackOff: "Back-off 10s restarting failed container=ununtu pod=ubuntu-ora-4001744982-pvjwv_default(4f739fd7-fe78-11e6-96e3-7824af3fe739)"

44s 18s 3 {kubelet k8node3} spec.containers{ununtu} Normal Pulling pulling image "fernandoacorreia/ubuntu-14.04-oracle-java-1.7"
38s 17s 3 {kubelet k8node3} spec.containers{ununtu} Normal Pulled Successfully pulled image "fernandoacorreia/ubuntu-14.04-oracle-java-1.7"
17s 17s 1 {kubelet k8node3} spec.containers{ununtu} Normal Created Created container with docker id 89faf423f478; Security:[seccomp=unconfined]
17s 17s 1 {kubelet k8node3} spec.containers{ununtu} Normal Started Started container with docker id 89faf423f478
35s 3s 4 {kubelet k8node3} spec.containers{ununtu} Warning BackOff Back-off restarting failed docker container
16s 3s 2 {kubelet k8node3} Warning FailedSync Error syncing pod, skipping: failed to "StartContainer" for "ununtu" with CrashLoopBackOff: "Back-off 20s restarting failed container=ununtu pod=ubuntu-ora-4001744982-pvjwv_default(4f739fd7-fe78-11e6-96e3-7824af3fe739)"

第五步:

docker ps -a|grep ubun
b708ebc0ebcb fernandoacorreia/ubuntu-14.04-oracle-java-1.7 "java" About a minute ago Exited (1) About a minute ago k8s_ununtu.94603cd2_ubuntu-ora-4001744982-pvjwv_default_4f739fd7-fe78-11e6-96e3-7824af3fe739_668ca1c5
ec287bb33333 gcr.io/google_containers/pause-amd64:3.0 "/pause" 4 minutes ago Up 4 minutes k8s_POD.d8dbe16c_ubuntu-ora-4001744982-pvjwv_default_4f739fd7-fe78-11e6-96e3-7824af3fe739_afa16f4c

你看到: https ://github.com/kubernetes/kubernetes/issues/42377

4

0 回答 0