美文网首页
kubernetes1.7 上安装rabbitmq

kubernetes1.7 上安装rabbitmq

作者: Herman7z | 来源:发表于2018-03-22 14:22 被阅读0次

    rabbit-deployment.yaml

    apiVersion: extensions/v1beta1
    kind: Deployment
    metadata:
      annotations:
        fabric8.io/iconUrl: https://raw.githubusercontent.com/docker-library/docs/81187b7b50f5af5bdb64d75882f4d9c782ad52c3/rabbitmq/logo.png
      labels:
        app: rabbitmq
        provider: rabbit
        version: 3.6.11-management
        group: com.rabbit
      name: rabbitmq
    spec:
      replicas: 1
      selector:
        matchLabels:
          app: rabbitmq
          provider: rabbit
          group: com.rabbit
      template:
        metadata:
          annotations:
            fabric8.io/iconUrl: https://raw.githubusercontent.com/docker-library/docs/81187b7b50f5af5bdb64d75882f4d9c782ad52c3/rabbitmq/logo.png
          labels:
            app: rabbitmq
            provider: rabbit
            version: 3.6.11-management
            group: com.rabbit
        spec:
          containers:
          - env:
            - name: RABBITMQ_DEFAULT_USER
              value: "rabbit"
            - name: RABBITMQ_DEFAULT_PASS
              value: "123456"
            image: rabbitmq:3.6.11-management
            imagePullPolicy: IfNotPresent
            name: rabbitmq
            ports:
            - containerPort: 15672
              name: manager
            - containerPort: 5672
              name: broker
    

    rabbit-svc.yaml

    apiVersion: v1
    kind: List
    items:
    - apiVersion: v1
      kind: Service
      metadata:
        annotations:
          api.service.kubernetes.io/path: /
          fabric8.io/iconUrl: https://raw.githubusercontent.com/docker-library/docs/81187b7b50f5af5bdb64d75882f4d9c782ad52c3/rabbitmq/logo.png
        labels:
          expose: "true"
          app: rabbitmq
          provider: rabbit
          version: 3.6.11-management
          group: com.rabbit
        name: mqadmin
      spec:
        ports:
        - name: http
          port: 15672
          protocol: TCP
          targetPort: 15672
        selector:
          app: rabbitmq
          provider: rabbit
          group: com.rabbit
    - apiVersion: v1
      kind: Service
      metadata:
        annotations:
          api.service.kubernetes.io/path: /
          fabric8.io/iconUrl: https://raw.githubusercontent.com/docker-library/docs/81187b7b50f5af5bdb64d75882f4d9c782ad52c3/rabbitmq/logo.png
        labels:
          expose: "true"
          app: rabbitmq
          provider: rabbit
          version: 3.6.11-management
          group: com.rabbit
        name: rabbitmq
      spec:
        ports:
        - name: http
          port: 5672
          protocol: TCP
          targetPort: 5672
        selector:
          app: rabbitmq
          provider: rabbit
          group: com.rabbit

    相关文章

      网友评论

          本文标题:kubernetes1.7 上安装rabbitmq

          本文链接:https://www.haomeiwen.com/subject/hpsaqftx.html