添加友达k8s文件
This commit is contained in:
@@ -0,0 +1,72 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: fangjia-youda-web-business
|
||||||
|
namespace: fangjia
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
strategy:
|
||||||
|
type: RollingUpdate
|
||||||
|
rollingUpdate:
|
||||||
|
maxSurge: 1
|
||||||
|
maxUnavailable: 0
|
||||||
|
revisionHistoryLimit: 5
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
project: fangjia-youda-web-business
|
||||||
|
app: fangjia
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
project: fangjia-youda-web-business
|
||||||
|
app: fangjia
|
||||||
|
spec:
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: nexus-registry-secret
|
||||||
|
nodeSelector:
|
||||||
|
app: fangjia
|
||||||
|
containers:
|
||||||
|
- name: fangjia-youda-web-business
|
||||||
|
image: 192.168.0.19:9012/fangjia-youda-web-business:1.1
|
||||||
|
imagePullPolicy: Always
|
||||||
|
ports:
|
||||||
|
- containerPort: 8080
|
||||||
|
name: web
|
||||||
|
protocol: TCP
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /login
|
||||||
|
port: web
|
||||||
|
initialDelaySeconds: 5
|
||||||
|
periodSeconds: 10
|
||||||
|
livenessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /login
|
||||||
|
port: web
|
||||||
|
initialDelaySeconds: 10
|
||||||
|
periodSeconds: 5
|
||||||
|
volumeMounts:
|
||||||
|
- name: host-time
|
||||||
|
mountPath: /etc/localtime
|
||||||
|
volumes:
|
||||||
|
- name: host-time
|
||||||
|
hostPath:
|
||||||
|
path: /etc/localtime
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: fangjia-youda-web-business
|
||||||
|
namespace: fangjia
|
||||||
|
labels:
|
||||||
|
project: fangjia-youda-web-business
|
||||||
|
app: fangjia
|
||||||
|
spec:
|
||||||
|
type: NodePort
|
||||||
|
selector:
|
||||||
|
project: fangjia-youda-web-business
|
||||||
|
app: fangjia
|
||||||
|
ports:
|
||||||
|
- port: 8080
|
||||||
|
targetPort: 8080
|
||||||
|
nodePort: 30012
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: fangjia-youda-web-customer
|
||||||
|
namespace: fangjia
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
strategy:
|
||||||
|
type: RollingUpdate
|
||||||
|
rollingUpdate:
|
||||||
|
maxSurge: 1
|
||||||
|
maxUnavailable: 0
|
||||||
|
revisionHistoryLimit: 5
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
project: fangjia-youda-web-customer
|
||||||
|
app: fangjia
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
project: fangjia-youda-web-customer
|
||||||
|
app: fangjia
|
||||||
|
spec:
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: nexus-registry-secret
|
||||||
|
nodeSelector:
|
||||||
|
app: fangjia
|
||||||
|
containers:
|
||||||
|
- name: fangjia-youda-web-customer
|
||||||
|
image: 192.168.0.19:9012/fangjia-youda-web-customer:1.1
|
||||||
|
imagePullPolicy: Always
|
||||||
|
ports:
|
||||||
|
- containerPort: 8080
|
||||||
|
name: web
|
||||||
|
protocol: TCP
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /login
|
||||||
|
port: web
|
||||||
|
initialDelaySeconds: 5
|
||||||
|
periodSeconds: 10
|
||||||
|
livenessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /login
|
||||||
|
port: web
|
||||||
|
initialDelaySeconds: 10
|
||||||
|
periodSeconds: 5
|
||||||
|
volumeMounts:
|
||||||
|
- name: host-time
|
||||||
|
mountPath: /etc/localtime
|
||||||
|
volumes:
|
||||||
|
- name: host-time
|
||||||
|
hostPath:
|
||||||
|
path: /etc/localtime
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: fangjia-youda-web-customer
|
||||||
|
namespace: fangjia
|
||||||
|
labels:
|
||||||
|
project: fangjia-youda-web-customer
|
||||||
|
app: fangjia
|
||||||
|
spec:
|
||||||
|
type: NodePort
|
||||||
|
selector:
|
||||||
|
project: fangjia-youda-web-customer
|
||||||
|
app: fangjia
|
||||||
|
ports:
|
||||||
|
- port: 8080
|
||||||
|
targetPort: 8080
|
||||||
|
nodePort: 30011
|
||||||
Reference in New Issue
Block a user