上传文件至 'Yaml文件'
This commit is contained in:
parent
d050bed50d
commit
734f3287b2
|
@ -0,0 +1,48 @@
|
|||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: xaddt
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: nginx-xingdian
|
||||
labels:
|
||||
xingdian: nginx
|
||||
namespace: xaddt
|
||||
|
||||
spec:
|
||||
replicas: 2
|
||||
selector:
|
||||
matchLabels:
|
||||
xingdian: nginx
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
xingdian: nginx
|
||||
spec:
|
||||
containers:
|
||||
- name: nginx-xingdian
|
||||
image: 10.36.174.164/xingdian/nginx:v1
|
||||
ports:
|
||||
- containerPort: 80
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: my-xaddt
|
||||
namespace: xaddt
|
||||
spec:
|
||||
selector:
|
||||
xingdian: nginx
|
||||
type: NodePort
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 80
|
||||
nodePort: 30011
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue