增加nginx示例yaml
commit
70421cdc59
|
|
@ -0,0 +1,30 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: nginx-demo
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: nginx-demo
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: nginx-demo
|
||||
spec:
|
||||
containers:
|
||||
- name: nginx-demo
|
||||
image: 'nginx:alpine'
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: nginx-loadbalancer
|
||||
spec:
|
||||
type: NodePort
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 80
|
||||
nodePort: 30080
|
||||
selector:
|
||||
app: nginx-demo
|
||||
Loading…
Reference in New Issue