redis單例部署

lixianfa1110發表於2019-01-25

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: hunan-zhuzhou-redis
namespace: szd-171abe8d
labels:

caas_service: hunan-zhuzhou-redis
caas_user: caoyan841

spec:
selector:

matchLabels:
  caas_service: hunan-zhuzhou-redis

replicas: 1
template:

metadata:
  labels:
    caas_service: hunan-zhuzhou-redis
    caas_user: caoyan841
spec:
  containers:
  - name: redis
    image: hub.yun.paic.com.cn/library/redis:3.0
    imagePullPolicy: Always
    resources:
      limits:
        cpu: 4000m
        memory: 8Gi
      requests:
        cpu: 1000m
        memory: 2Gi
    ports:
    - containerPort: 6379
      protocol: TCP
    #args:
    #  - --apiserver-host=http://10.20.20.136:8080
  nodeSelector:
    caas_cluster: szd-171abe8d

apiVersion: v1
kind: Service
metadata:
name: hunan-zhuzhou-redis
namespace: szd-171abe8d
labels:

caas_service: hunan-zhuzhou-redis
caas_user: caoyan841

spec:
selector:

caas_service: hunan-zhuzhou-redis 

ports:

  • port: 6379
    targetPort: 6379


相關文章