s.png

apiVersion: v1
kind: Service
metadata:
  name: redis
  namespace: crawlab
spec:
  ports:
  - port: 6379
  selector:
    app: redis
  clusterIP: None
---
apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
kind: Deployment
metadata:
  name: redis
  namespace: crawlab
spec:
  selector:
    matchLabels:
      app: redis
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: redis
    spec:
      containers:
      - image: redis
        name: redis
        ports:
        - containerPort: 6379
          name: redis

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注

Captcha Code