上传文件至 'Yaml文件'

This commit is contained in:
diandian 2023-03-30 16:41:36 +08:00
parent d050bed50d
commit 734f3287b2
1 changed files with 48 additions and 0 deletions

View File

@ -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