k8s創建pod

第1章 nginx配置文件yaml

1.1 nginx _rc文件 rc資源類型

cat nginx_rc.yaml
apiVersion: v1
kind: ReplicationController
metadata:
  name: nginx4
spec:
   replicas: 1
   selector:
     app: nginx4
   template:
     metadata:
       labels:
         app: nginx4
     spec:
       containers:
       - name: nginx4
         image: 10.0.0.10:5000/nginx:v2
         ports:
         - containerPort: 80
         volumeMounts:
          - mountPath: /usr/local/nginx/html
            name: web
       volumes:
        - hostPath:
           path: /root/test
          name: web


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章