提交k8s配置文件
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: redis-pod
|
||||
namespace: fangjia
|
||||
labels:
|
||||
app: redis
|
||||
spec:
|
||||
replicas: 1
|
||||
strategy:
|
||||
type: RollingUpdate
|
||||
rollingUpdate:
|
||||
maxSurge: 1
|
||||
maxUnavailable: 0
|
||||
revisionHistoryLimit: 5
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
project: redis-pod
|
||||
app: redis
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: nexussecret
|
||||
containers:
|
||||
- name: redis
|
||||
image: 192.168.0.19:9012/redis
|
||||
imagePullPolicy: Always
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: redis-pod
|
||||
namespace: fangjia
|
||||
labels:
|
||||
project: redis-pod
|
||||
app: redis
|
||||
spec:
|
||||
type: NodePort
|
||||
selector:
|
||||
project: redis-pod
|
||||
app: redis
|
||||
ports:
|
||||
- port: 6379
|
||||
targetPort: 6379
|
||||
nodePort: 30000
|
||||
Reference in New Issue
Block a user