1. 程式人生 > >k8s pod.yml解釋

k8s pod.yml解釋

apiVersion: v1
kind: Pod
metadata:
  name: yueying
  namespace: kube-public
  labels:
    name: testpods
spec:
  containers:
  - name: testpods
    image: nginx
    ports:
    - containerPort: 80
      hostPort: 8781
      protocol: TCP
      imagePullPolicy: IfNotPresent
nodeSelector:
     kubernetes.io/hostname: 10.83.52.105