为什么需要service?
pod地址会发生变化?
[root@master Chapter5]# cat nginx.yaml
apiVersion: v1
kind: Pod
metadata:
name: my-nginx
labels:
name: my-nginx
spec:
containers:
- name: my-nginx
image: registry.cn-beijing.aliyuncs.com/qingfeng666/nginx:latest
resources:
limits:
memory: "128Mi"
cpu: "500m"
ports:
- containerPort: 80
[root@master Chapter5]# kubectl create -f nginx.yaml
pod/my-nginx created
[root@master Chapter5]# kubectl get pod my-nginx
NAME READY STATUS RESTARTS AGE
my-nginx 0/1 ContainerCreating 0 15s