helm部署

110 阅读2分钟
原文链接: yq.aliyun.com

---

apiVersion: v1

kind: ServiceAccount

imagePullSecrets:

- name: default

metadata:

  name: tiller

  namespace: kube-system

---

apiVersion: rbac.authorization.k8s.io/v1beta1

kind: ClusterRoleBinding

metadata:

  name: tiller

roleRef:

  apiGroup: rbac.authorization.k8s.io

  kind: ClusterRole

  name: cluster-admin

subjects:

  - kind: ServiceAccount

    name: tiller

    namespace: kube-system



---

apiVersion: extensions/v1beta1

kind: Deployment

metadata:

  annotations:

    deployment.kubernetes.io/revision: "1"

  labels:

    app: helm

    name: tiller

  name: tiller-deploy

  namespace: kube-system

spec:

  replicas: 2

  selector:

    matchLabels:

      app: helm

      name: tiller

  strategy:

    rollingUpdate:

      maxSurge: 1

      maxUnavailable: 1

    type: RollingUpdate

  template:

    metadata:

      creationTimestamp: null

      labels:

        app: helm

        name: tiller

    spec:

      containers:

      - env:

        - name: TILLER_NAMESPACE

          value: kube-system

        - name: TILLER_HISTORY_MAX

          value: "0"

        image: hub.cloud.papub/helm/tiller:v2.7.2

        imagePullPolicy: IfNotPresent

        livenessProbe:

          failureThreshold: 3

          httpGet:

            path: /liveness

            port: 44135

            scheme: HTTP

          initialDelaySeconds: 1

          periodSeconds: 10

          successThreshold: 1

          timeoutSeconds: 1

        name: tiller

        ports:

        - containerPort: 44134

          name: tiller

          protocol: TCP

        readinessProbe:

          failureThreshold: 3

          httpGet:

            path: /readiness

            port: 44135

            scheme: HTTP

          initialDelaySeconds: 1

          periodSeconds: 10

          successThreshold: 1

          timeoutSeconds: 1

        resources: {}

        terminationMessagePath: /dev/termination-log

        terminationMessagePolicy: File

      dnsPolicy: ClusterFirst

      restartPolicy: Always

      schedulerName: default-scheduler

      securityContext: {}

      serviceAccount: tiller

      serviceAccountName: tiller

      terminationGracePeriodSeconds: 30

      nodeSelector:

        caas_cluster: kube-system

---

apiVersion: v1

kind: Service

metadata:

  labels:

    app: helm

    name: tiller

  name: tiller-deploy

  namespace: kube-system

spec:

  ports:

  - name: tiller

    port: 44134

    protocol: TCP

    targetPort: tiller

  selector:

    app: helm

    name: tiller

  sessionAffinity: None


---