Kubernetes 小白學習筆記(15)--k8s叢集路線-kubectl命令詳解

軟體工程小施同學發表於2020-10-18

 

 

 

apiVersion: apps/v1
kind: Deployment
metadata:
  # Unique key of the Deployment instance
  name: deployment-example
spec:
  # 3 Pods should exist at all times.
  replicas: 2
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        # Apply this label to pods and default
        # the Deployment label selector to this value
        app: nginx
    spec:
      containers:
      - name: nginx
        # Run this image
        image: nginx:1.10

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

內容來自:

https://coding.imooc.com/class/284.html

相關文章