zoukankan      html  css  js  c++  java
  • deployment模板实例

    apiVersion: extensions/v1beta1
    kind: Deployment
    metadata:
      name: ywcredit
      namespace: default
      labels:
        k8s-app: microservice
    spec:
      replicas: 2
      selector:
        matchLabels:
          k8s-app: microservice
      strategy:
        rollingUpdate:
          maxSurge: 1
          maxUnavailable: 1
        type: RollingUpdate
      template:
        metadata:
          labels:
            k8s-app: microservice
        spec:
          imagePullSecrets:
          - name: registry-secret
          containers:
          - name: ywcredit
            image: registry.xxxx.com/yw/ywcredit:v3008
            imagePullPolicy: IfNotPresent
            ports:
            - containerPort: 8081
              protocol: TCP
            readinessProbe:
              httpGet:
                scheme: HTTP
                path: /swagger-ui.html
                port: 8081
              initialDelaySeconds: 10
              periodSeconds: 5
            resources:
              limits:
                cpu: "1"
              requests:
                cpu: 100m
    #        terminationMessagePath: /dev/termination-log
    #        terminationMessagePolicy: File
          dnsPolicy: ClusterFirst
          restartPolicy: Always
          schedulerName: default-scheduler
          securityContext: {}
          terminationGracePeriodSeconds: 30
    
    
          配置registy 账号
          kubectl create secret docker-registry registry-secret --docker-server=registry.xxxx.com --docker-username=USER --docker-password=PASSWD -n default
    

      

  • 相关阅读:
    函数的对称性及其图像变换
    KMP 字符串匹配
    15 保护模式中的特权级(上)
    每日总结
    每日总结
    每日总结
    每日总结
    每日总结
    每日总结
    2-26安卓自学
  • 原文地址:https://www.cnblogs.com/gandefeng/p/10183881.html
Copyright © 2011-2022 走看看