[root@node1 ~]# cat nginx.yaml
apiVersion: v1
kind: Pod
metadata:
name: my-nginx
spec:
containers:
[root@node1 ~]# cat nginx.yaml
apiVersion: v1
kind: Pod
metadata:
name: my-nginx
labels:
name: my-nginx
spec:
containers:
[root@node1 ~]# kubectl get pod
NAME READY STATUS RESTARTS AGE
my-nginx 0/1 ImagePullBackOff 0 18s
使用了上面两个yaml文件都不行,一个电子书上的,一个是课程中的。