Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # 174-webserver-deployment.yaml
- apiVersion: apps/v1 # Kubernetes API version
- kind: Deployment # Type of resource
- metadata: # Resource metadata
- name: mywebserver # Resource name
- labels: # Labels for the resource
- app: httpd # Label "app=httpd"
- spec: # Resource specifications
- replicas: 2 # Number of replicas
- selectors: # Pod selectors
- matchLabels: # Selects Pods with matching labels
- app: httpd # Selects Pods labeled "app=httpd"
- template: # Pod template
- metadata: # Pod metadata
- labels: # Labels for the Pod
- app: httpd # Label "app=httpd"
- spec: # Pod specifications
- containers: # Containers to create in the Pod
- - name: myhttpd # Container name
- image: httpd # Docker image
- ports: # Container ports
- - containersPort: 80 # Port number (HTTP traffic)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement