<output id="qn6qe"></output>

    1. <output id="qn6qe"><tt id="qn6qe"></tt></output>
    2. <strike id="qn6qe"></strike>

      亚洲 日本 欧洲 欧美 视频,日韩中文字幕有码av,一本一道av中文字幕无码,国产线播放免费人成视频播放,人妻少妇偷人无码视频,日夜啪啪一区二区三区,国产尤物精品自在拍视频首页,久热这里只有精品12

      k8s~helm構(gòu)建一個(gè)應(yīng)用

      三個(gè)概念

      1. chart:包含了創(chuàng)建Kubernetes的一個(gè)應(yīng)用實(shí)例的必要信息
      2. config:包含了應(yīng)用發(fā)布配置信息
      3. release:是一個(gè)chart及其配置的一個(gè)運(yùn)行實(shí)例

      建立一個(gè)helm charts

      helm create hello-world
      
      • Chart.yaml 用于描述這個(gè)Chart的相關(guān)信息,包括名字、描述信息以及版本等。
        僅僅是一些簡(jiǎn)單的文本描述

      • values.yaml 用于存儲(chǔ) templates 目錄中模板文件中用到變量的值。

      • NOTES.txt 用于介紹 Chart 部署后的一些信息,例如:如何使用這個(gè) Chart、列出缺省的設(shè)置等。

      • Templates 目錄下是 YAML 文件的模板,該模板文件遵循 Go template 語(yǔ)法。

      Templates 目錄下 YAML 文件模板的值默認(rèn)都是在 values.yaml 里定義的,比如在 deployment.yaml 中定義的容器鏡像。
      image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
      其中的 .Values.image.repository 的值就是在 values.yaml 里定義的 nginx,.Values.image.tag 的值就是 stable。
      以上兩個(gè)變量值是在 create chart 的時(shí)候就自動(dòng)生成的默認(rèn)值,你可以根據(jù)實(shí)際情況進(jìn)行修改。實(shí)際上都是靜態(tài)文本,只在是執(zhí)行的時(shí)候才被解析.

      構(gòu)建一個(gè)helm應(yīng)用

      打開(kāi) Chart.yaml,可以看到內(nèi)容如下,配置名稱和版本

      apiVersion: v1
      appVersion: "1.0"
      description: A Helm chart for Kubernetes
      name: mychart
      version: 0.1.0
      

      編輯 values.yaml,它默認(rèn)會(huì)在 Kubernetes 部署一個(gè) Nginx。下面是 mychart 應(yīng)用的 values.yaml 文件的內(nèi)容:

      $ cat mychart/values.yaml
      # Default values for mychart.
      # This is a YAML-formatted file.
      # Declare variables to be passed into your templates.
      
      replicaCount: 1
      
      image:
        repository: nginx
        tag: stable
        pullPolicy: IfNotPresent
      
      service:
        type: ClusterIP
        port: 80
      
      ingress:
        enabled: false
        annotations: {}
          # kubernetes.io/ingress.class: nginx
          # kubernetes.io/tls-acme: "true"
        path: /
        hosts:
          - chart-example.local
        tls: []
        #  - secretName: chart-example-tls
        #    hosts:
        #      - chart-example.local
      
      resources: {}
        # We usually recommend not to specify default resources and to leave this as a conscious
        # choice for the user. This also increases chances charts run on environments with little
        # resources, such as Minikube. If you do want to specify resources, uncomment the following
        # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
        # limits:
        #  cpu: 100m
        #  memory: 128Mi
        # requests:
        #  cpu: 100m
        #  memory: 128Mi
      
      nodeSelector: {}
      
      tolerations: []
      
      affinity: {}
      

      檢查模塊配置

      $ helm lint hello-world/
      

      打包

      helm package hello-world
      helm package mychart --debug #顯示詳細(xì)信息
      

      啟動(dòng)helm本地倉(cāng)庫(kù)(helm3已被移除)

      helm serve  --repo-path /data/helm/repository/ --url http://172.17.0.22:8879/charts/ &
      

      倉(cāng)庫(kù)刷新和查詢應(yīng)用

      $ helm repo update
      $ helm search mychart
      NAME         	CHART VERSION	APP VERSION	DESCRIPTION
      local/hello-world	0.1.0        	1.0        	A Helm chart for Kubernetes
      

      在 Kubernetes 中部署應(yīng)用

      Chart 被發(fā)布到倉(cāng)儲(chǔ)后,就可以通過(guò) helm install 命令部署該 Chart。

      helm install  hello local/hello-world
      

      查看Release的狀態(tài)信息

       helm status wordpress
      

      升級(jí)charts

      helm upgrade  wordpress stable/wordpress
      helm upgrade --install --force hello-world ./hello.tgz --namespace test  # 也可以指定命名空間和它的taz包
      

      回滾到上一個(gè)版本

      helm rollback hello-world 1 # 向上歸滾一個(gè)版本
      
      posted @ 2020-04-10 10:08  張占嶺  閱讀(1338)  評(píng)論(0)    收藏  舉報(bào)
      主站蜘蛛池模板: 亚洲AV永久无码嘿嘿嘿嘿| 国产主播精品福利午夜二区| 强奷漂亮少妇高潮伦理| 桑植县| 亚洲性日韩精品一区二区| 国产亚洲一在无在线观看| 久久国产乱子伦免费精品无码 | 超清无码一区二区三区| 日本亚洲一区二区精品| 国产一级r片内射免费视频| 成人一区二区不卡国产| 日韩免费无码人妻波多野| 99在线精品视频观看免费| 国产极品粉嫩尤物一线天| 亚欧乱色精品免费观看| 国产精品视频一区不卡| 国产一区二区三区色噜噜| 国产午夜成人无码免费看| 狠狠亚洲色一日本高清色| 亚洲综合一区二区三区| 丰满少妇被猛烈进入av久久| 成人免费乱码大片a毛片| 精品久久久久久中文字幕202| 国产亚洲av夜间福利香蕉149 | 亚洲国产精品日韩av专区| 青青青视频免费一区二区| 亚洲国产欧美一区二区好看电影| 老熟妇老熟女老女人天堂| 狠狠躁日日躁夜夜躁欧美老妇| 亚洲av永久无码精品天堂久久| 亚洲国产精品一区二区第一页| 久久久久国色av免费看| 日本中文一二区有码在线| 无码国产偷倩在线播放| 锡林郭勒盟| 免费国产好深啊好涨好硬视频| 国产成人精品午夜2022| 新津县| 在线中文一区字幕对白| 在线看av一区二区三区| 亚洲在战av极品无码|