23 lines
636 B
YAML
23 lines
636 B
YAML
|
|
apiVersion: apps/v1
|
||
|
|
kind: Deployment
|
||
|
|
metadata:
|
||
|
|
labels:
|
||
|
|
run: neg-demo-app # Label for the Deployment
|
||
|
|
name: neg-demo-app # Name of Deployment
|
||
|
|
spec:
|
||
|
|
selector:
|
||
|
|
matchLabels:
|
||
|
|
run: neg-demo-app
|
||
|
|
template: # Pod template
|
||
|
|
metadata:
|
||
|
|
labels:
|
||
|
|
run: neg-demo-app # Labels Pods from this Deployment
|
||
|
|
spec: # Pod specification; each Pod created by this Deployment has this specification
|
||
|
|
containers:
|
||
|
|
- image: registry.k8s.io/serve_hostname:v1.4 # Application to run in Deployment's Pods
|
||
|
|
name: hostname # Container name
|
||
|
|
ports:
|
||
|
|
- containerPort: 9376
|
||
|
|
protocol: TCP
|
||
|
|
|