11.5 chart详解

  chart由一系列文件组成,这些文件描述了K8s部署应用时需要的资源,比如Servcie、Deployment、PersistentVolmeClaim、Secret、ConfigMap等。

  chart可以很复杂,部署整个应用,比如包含HTTP servers、Database、消息中间件、Cache等。

  chart将这些文件放置在预定义的目录结构中,通常被打包成tar包,而且标注上版本信息,便于Helm部署。

11.5.1 chart目录结构

  一旦安装了某个chart,就可以在 ~/.helm/cache/archive中找到chart的tar包。

kubeusr@GalaxyKubernetesMaster:~$ ls ~/.helm/cache/archive
mysql-0.10..tgz redis-3.7..tgz 

解压mysql-0.10.1.tgz

tar zxvf mysql-0.10.1.tgz -C /home

(1)Chart.yaml

  描述chart的概要信息。

appVersion: 5.7.
description: Fast, reliable, scalable, and easy to use open-source relational database
system.
engine: gotpl
home: https://www.mysql.com/
icon: https://www.mysql.com/common/logos/logo-mysql-170x115.png
keywords:
- mysql
- database
- sql
maintainers:
- email: o.with@sportradar.com
name: olemarkus
- email: viglesias@google.com
name: viglesiasce
name: mysql # 必填的
sources:
- https://github.com/kubernetes/charts
- https://github.com/docker-library/mysql
version: 0.10.1 # 必填的

   (2) README.md

# MySQL
[MySQL](https://MySQL.org) is one of the most popular database servers in the world. Notable users include Wikipedia, Facebook and Google.
## Introduction
This chart bootstraps a single node MySQL deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
## Prerequisites
- Kubernetes 1.6+ with Beta APIs enabled
- PV provisioner support in the underlying infrastructure
## Installing the Chart
To install the chart with the release name `my-release`:
```bash
$ helm install --name my-release stable/mysql
```
The command deploys MySQL on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation.
By default a random password will be generated for the root user. If you'd like to set your own password change the mysqlRootPassword
in the values.yaml.
You can retrieve your root password by running the following command. Make sure to replace [YOUR_RELEASE_NAME]:
printf $(printf '\%o' `kubectl get secret [YOUR_RELEASE_NAME]-mysql -o jsonpath="{.data.mysql-root-password[*]}"`)
> **Tip**: List all releases using `helm list`
## Uninstalling the Chart
To uninstall/delete the `my-release` deployment:
```bash
$ helm delete my-release
```
The command removes all the Kubernetes components associated with the chart and deletes the release.
## Configuration
The following table lists the configurable parameters of the MySQL chart and their default values.
| Parameter | Description | Default |
| -------------------------------------------- | -------------------------------------------------------------------------------------------- | ---------------------------------------------------- |
| `image` | `mysql` image repository. | `mysql` |
| `imageTag` | `mysql` image tag. | `5.7.` |
| `imagePullPolicy` | Image pull policy | `IfNotPresent` |
| `existingSecret` | Use Existing secret for Password details | `nil` |
| `extraVolumes` | Additional volumes as a string to be passed to the `tpl` function | |
| `extraVolumeMounts` | Additional volumeMounts as a string to be passed to the `tpl` function | |
| `extraInitContainers` | Additional init containers as a string to be passed to the `tpl` function | |
| `mysqlRootPassword` | Password for the `root` user. Ignored if existing secret is provided | Random characters |
| `mysqlUser` | Username of new user to create. | `nil` |
| `mysqlPassword` | Password for the new user. Ignored if existing secret is provided | Random characters |
| `mysqlDatabase` | Name for new database to create. | `nil` |
| `livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated | |
| `livenessProbe.periodSeconds` | How often to perform the probe | |
| `livenessProbe.timeoutSeconds` | When the probe times out | |
| `livenessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed. | |
| `livenessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | |
| `readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated | |
| `readinessProbe.periodSeconds` | How often to perform the probe | |
| `readinessProbe.timeoutSeconds` | When the probe times out | |
| `readinessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed. | |
| `readinessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | |
| `persistence.enabled` | Create a volume to store data | true |
| `persistence.size` | Size of persistent volume claim | 8Gi RW |
| `persistence.storageClass` | Type of persistent volume claim | nil (uses alpha storage class annotation) |
| `persistence.accessMode` | ReadWriteOnce or ReadOnly | ReadWriteOnce |
| `persistence.existingClaim` | Name of existing persistent volume | `nil` |
| `persistence.subPath` | Subdirectory of the volume to mount | `nil` |
| `persistence.annotations` | Persistent Volume annotations | {} |
| `nodeSelector` | Node labels for pod assignment | {} |
| `metrics.enabled` | Start a side-car prometheus exporter | `false` |
| `metrics.image` | Exporter image | `prom/mysqld-exporter` |
| `metrics.imageTag` | Exporter image | `v0.10.0` |
| `metrics.imagePullPolicy` | Exporter image pull policy | `IfNotPresent` |
| `metrics.resources` | Exporter resource requests/limit | `nil` |
| `metrics.livenessProbe.initialDelaySeconds` | Delay before metrics liveness probe is initiated | |
| `metrics.livenessProbe.timeoutSeconds` | When the probe times out | |
| `metrics.readinessProbe.initialDelaySeconds` | Delay before metrics readiness probe is initiated | |
| `metrics.readinessProbe.timeoutSeconds` | When the probe times out | |
| `resources` | CPU/Memory resource requests/limits | Memory: `256Mi`, CPU: `100m` |
| `configurationFiles` | List of mysql configuration files | `nil` |
| `ssl.enabled` | Setup and use SSL for MySQL connections | `false` |
| `ssl.secret` | Name of the secret containing the SSL certificates | mysql-ssl-certs |
| `ssl.certificates[].name` | Name of the secret containing the SSL certificates | `nil` |
| `ssl.certificates[].ca` | CA certificate | `nil` |
| `ssl.certificates[].cert` | Server certificate (public key) | `nil` |
| `ssl.certificates[].key` | Server key (private key) | `nil` |
| `imagePullSecrets` | Name of Secret resource containing private registry credentials | `nil` |
| `initializationFiles` | List of SQL files which are run after the container started | `nil` |
| `timezone` | Container and mysqld timezone (TZ env) | `nil` (UTC depending on image) |
| `podAnnotations` | Map of annotations to add to the pods | `{}` | Some of the parameters above map to the env variables defined in the [MySQL DockerHub image](https://hub.docker.com/_/mysql/). Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, ```bash
$ helm install --name my-release \
--set mysqlRootPassword=secretpassword,mysqlUser=my-user,mysqlPassword=my-password,mysqlDatabase=my-database \
stable/mysql
``` The above command sets the MySQL `root` account password to `secretpassword`. Additionally it creates a standard database user named `my-user`, with the password `my-password`, who has access to a database named `my-database`. Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example, ```bash
$ helm install --name my-release -f values.yaml stable/mysql
``` > **Tip**: You can use the default [values.yaml](values.yaml) ## Persistence The [MySQL](https://hub.docker.com/_/mysql/) image stores the MySQL data and configurations at the `/var/lib/mysql` path of the container. By default a PersistentVolumeClaim is created and mounted into that directory. In order to disable this functionality
you can change the values.yaml to disable persistence and use an emptyDir instead. > *"An emptyDir volume is first created when a Pod is assigned to a Node, and exists as long as that Pod is running on that node. When a Pod is removed from a node for any reason, the data in the emptyDir is deleted forever."* ## Custom MySQL configuration files The [MySQL](https://hub.docker.com/_/mysql/) image accepts custom configuration files at the path `/etc/mysql/conf.d`. If you want to use a customized MySQL configuration, you can create your alternative configuration files by passing the file contents on the `configurationFiles` attribute. Note that according to the MySQL documentation only files ending with `.cnf` are loaded. ```yaml
configurationFiles:
mysql.cnf: |-
[mysqld]
skip-host-cache
skip-name-resolve
sql-mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
mysql_custom.cnf: |-
[mysqld]
``` ## MySQL initialization files The [MySQL](https://hub.docker.com/_/mysql/) image accepts *.sh, *.sql and *.sql.gz files at the path `/docker-entrypoint-initdb.d`.
These files are being run exactly once for container initialization and ignored on following container restarts.
If you want to use initialization scripts, you can create initialization files by passing the file contents on the `initializationFiles` attribute. ```yaml
initializationFiles:
first-db.sql: |-
CREATE DATABASE IF NOT EXISTS first DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
second-db.sql: |-
CREATE DATABASE IF NOT EXISTS second DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
``` ## SSL This chart supports configuring MySQL to use [encrypted connections](https://dev.mysql.com/doc/refman/5.7/en/encrypted-connections.html) with TLS/SSL certificates provided by the user. This is accomplished by storing the required Certificate Authority file, the server public key certificate, and the server private key as a Kubernetes secret. The SSL options for this chart support the following use cases: * Manage certificate secrets with helm
* Manage certificate secrets outside of helm ## Manage certificate secrets with helm Include your certificate data in the `ssl.certificates` section. For example: ```
ssl:
enabled: false
secret: mysql-ssl-certs
certificates:
- name: mysql-ssl-certs
ca: |-
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
cert: |-
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
key: |-
-----BEGIN RSA PRIVATE KEY-----
...
-----END RSA PRIVATE KEY-----
``` > **Note**: Make sure your certificate data has the correct formatting in the values file. ## Manage certificate secrets outside of helm . Ensure the certificate secret exist before installation of this chart.
. Set the name of the certificate secret in `ssl.secret`.
. Make sure there are no entries underneath `ssl.certificates`. To manually create the certificate secret from local files you can execute:
```
kubectl create secret generic mysql-ssl-certs \
--from-file=ca.pem=./ssl/certificate-authority.pem \
--from-file=server-cert.pem=./ssl/server-public-key.pem \
--from-file=server-key.pem=./ssl/server-private-key.pem
```
> **Note**: `ca.pem`, `server-cert.pem`, and `server-key.pem` **must** be used as the key names in this generic secret. If you are using a certificate your configurationFiles must include the three ssl lines under [mysqld] ```
[mysqld]
ssl-ca=/ssl/ca.pem
ssl-cert=/ssl/server-cert.pem
ssl-key=/ssl/server-key.pem
```

(3) LICENSE

    描述chart的许可信息,此文件为可选。

  (4) requirements.yaml

   指定chart的依赖关系,安装过程中,依赖的chart也会被安装。

  (5) values.yaml

   chart支持在安装时根据参数进行定制化配置,而values.xml则提供了这些配置参数的默认值。

## mysql image version
## ref: https://hub.docker.com/r/library/mysql/tags/
##
image: "mysql"
imageTag: "5.7.14" ## Specify password for root user
##
## Default: random character string
# mysqlRootPassword: testing ## Create a database user
##
# mysqlUser:
## Default: random character string
# mysqlPassword: ## Allow unauthenticated access, uncomment to enable
##
# mysqlAllowEmptyPassword: true ## Create a database
##
# mysqlDatabase: ## Specify an imagePullPolicy (Required)
## It's recommended to change this to 'Always' if the image tag is 'latest'
## ref: http://kubernetes.io/docs/user-guide/images/#updating-images
##
imagePullPolicy: IfNotPresent extraVolumes: |
# - name: extras
# emptyDir: {} extraVolumeMounts: |
# - name: extras
# mountPath: /usr/share/extras
# readOnly: true extraInitContainers: |
# - name: do-something
# image: busybox
# command: ['do', 'something'] # Optionally specify an array of imagePullSecrets.
# Secrets must be manually created in the namespace.
# ref: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod
# imagePullSecrets:
# - name: myRegistryKeySecretName ## Node selector
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector
nodeSelector: {} livenessProbe:
initialDelaySeconds:
periodSeconds:
timeoutSeconds:
successThreshold:
failureThreshold: readinessProbe:
initialDelaySeconds:
periodSeconds:
timeoutSeconds:
successThreshold:
failureThreshold: ## Persist data to a persistent volume
persistence:
enabled: true
## database data Persistent Volume Storage Class
## If defined, storageClassName: <storageClass>
## If set to "-", storageClassName: "", which disables dynamic provisioning
## If undefined (the default) or set to null, no storageClassName spec is
## set, choosing the default provisioner. (gp2 on AWS, standard on
## GKE, AWS & OpenStack)
##
# storageClass: "-"
accessMode: ReadWriteOnce
size: 8Gi
annotations: {} ## Configure resource requests and limits
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
##
resources:
requests:
memory: 256Mi
cpu: 100m # Custom mysql configuration files used to override default mysql settings
configurationFiles: {}
# mysql.cnf: |-
# [mysqld]
# skip-name-resolve
# ssl-ca=/ssl/ca.pem
# ssl-cert=/ssl/server-cert.pem
# ssl-key=/ssl/server-key.pem # Custom mysql init SQL files used to initialize the database
initializationFiles: {}
# first-db.sql: |-
# CREATE DATABASE IF NOT EXISTS first DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
# second-db.sql: |-
# CREATE DATABASE IF NOT EXISTS second DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci; metrics:
enabled: false
image: prom/mysqld-exporter
imageTag: v0.10.0
imagePullPolicy: IfNotPresent
resources: {}
annotations: {}
# prometheus.io/scrape: "true"
# prometheus.io/port: ""
livenessProbe:
initialDelaySeconds:
timeoutSeconds:
readinessProbe:
initialDelaySeconds:
timeoutSeconds: ## Configure the service
## ref: http://kubernetes.io/docs/user-guide/services/
service:
## Specify a service type
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services---service-types
type: ClusterIP
port:
# nodePort: ssl:
enabled: false
secret: mysql-ssl-certs
certificates:
# - name: mysql-ssl-certs
# ca: |-
# -----BEGIN CERTIFICATE-----
# ...
# -----END CERTIFICATE-----
# cert: |-
# -----BEGIN CERTIFICATE-----
# ...
# -----END CERTIFICATE-----
# key: |-
# -----BEGIN RSA PRIVATE KEY-----
# ...
# -----END RSA PRIVATE KEY----- ## Populates the 'TZ' system timezone environment variable
## ref: https://dev.mysql.com/doc/refman/5.7/en/time-zone-support.html
##
## Default: nil (mysql will use image's default timezone, normally UTC)
## Example: 'Australia/Sydney'
# timezone: # To be added to the database server pod(s)
podAnnotations: {}

  (6) templates:

     k8s各种资源的配置模板都在这。Helm会将values.yaml中的参数值注入模板中,生成标准的YAML配置文件。

    模板是chart的最重要的部分,也是Helm最强大的地方。模板增加了应用部署的灵活性,能够适用不同的环境。

(7)templates/NOTES.txt

   chart的简易适用文档。

11.5.2 chart模板 

  大部分属性变成了 {{XXX}}。 这些实际上是模板语法。 Helm采用GO语言的模板编写chart。Go模板非常强大,支持变量、对象、函数、流控制等功能。

{{- if not .Values.existingSecret }}
apiVersion: v1
kind: Secret
metadata:
name: {{ template "mysql.fullname" . }} # 定义secret的name。关键字template的作用是引用一个模板mysql.fullname
labels:
app: {{ template "mysql.fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
type: Opaque
data:
{{ if .Values.mysqlRootPassword }}
mysql-root-password: {{ .Values.mysqlRootPassword | b64enc | quote }}
{{ else }}
mysql-root-password: {{ randAlphaNum | b64enc | quote }}
{{ end }}
{{ if .Values.mysqlPassword }}
mysql-password: {{ .Values.mysqlPassword | b64enc | quote }}
{{ else }}
mysql-password: {{ randAlphaNum | b64enc | quote }}
{{ end }}
{{- if .Values.ssl.enabled }}
{{ if .Values.ssl.certificates }}
{{- range .Values.ssl.certificates }}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ .name }}
labels:
app: {{ template "mysql.fullname" $ }}
chart: "{{ $.Chart.Name }}-{{ $.Chart.Version }}"
release: "{{ $.Release.Name }}"
heritage: "{{ $.Release.Service }}"
type: Opaque
data:
ca.pem: {{ .ca | b64enc }}
server-cert.pem: {{ .cert | b64enc }}
server-key.pem: {{ .key | b64enc }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}

11.5.3 再次实践MySQL chartt

  安装之前需要清楚chart的使用方法。这些信息保存在values.yaml和README.MD,可以使用如下命令查看:

   阅读注释可以知道MySQL  chart支持哪些参数,安装前需要哪些准备。

kubeusr@GalaxyKubernetesMaster:~$ helm inspect values stable/mysql             #输出的是Values.yaml的内容
## mysql image version
## ref: https://hub.docker.com/r/library/mysql/tags/
##
image: "mysql"
imageTag: "5.7.14" ## Specify password for root user
##
## Default: random character string
# mysqlRootPassword: testing ## Create a database user
##
# mysqlUser:
## Default: random character string
# mysqlPassword: ## Allow unauthenticated access, uncomment to enable
##
# mysqlAllowEmptyPassword: true ## Create a database
##
# mysqlDatabase: ## Specify an imagePullPolicy (Required)
## It's recommended to change this to 'Always' if the image tag is 'latest'
## ref: http://kubernetes.io/docs/user-guide/images/#updating-images
##
imagePullPolicy: IfNotPresent extraVolumes: |
# - name: extras
# emptyDir: {} extraVolumeMounts: |
# - name: extras
# mountPath: /usr/share/extras
# readOnly: true extraInitContainers: |
# - name: do-something
# image: busybox
# command: ['do', 'something'] # Optionally specify an array of imagePullSecrets.
# Secrets must be manually created in the namespace.
# ref: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod
# imagePullSecrets:
# - name: myRegistryKeySecretName ## Node selector
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector
nodeSelector: {} livenessProbe:
initialDelaySeconds:
periodSeconds:
timeoutSeconds:
successThreshold:
failureThreshold: readinessProbe:
initialDelaySeconds:
periodSeconds:
timeoutSeconds:
successThreshold:
failureThreshold: ## Persist data to a persistent volume
persistence:
enabled: true
## database data Persistent Volume Storage Class
## If defined, storageClassName: <storageClass>
## If set to "-", storageClassName: "", which disables dynamic provisioning
## If undefined (the default) or set to null, no storageClassName spec is
## set, choosing the default provisioner. (gp2 on AWS, standard on
## GKE, AWS & OpenStack)
##
# storageClass: "-"
accessMode: ReadWriteOnce
size: 8Gi
annotations: {} ## Configure resource requests and limits
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
##
resources:
requests:
memory: 256Mi
cpu: 100m # Custom mysql configuration files used to override default mysql settings
configurationFiles: {}
# mysql.cnf: |-
# [mysqld]
# skip-name-resolve
# ssl-ca=/ssl/ca.pem
# ssl-cert=/ssl/server-cert.pem
# ssl-key=/ssl/server-key.pem # Custom mysql init SQL files used to initialize the database
initializationFiles: {}
# first-db.sql: |-
# CREATE DATABASE IF NOT EXISTS first DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
# second-db.sql: |-
# CREATE DATABASE IF NOT EXISTS second DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci; metrics:
enabled: false
image: prom/mysqld-exporter
imageTag: v0.10.0
imagePullPolicy: IfNotPresent
resources: {}
annotations: {}
# prometheus.io/scrape: "true"
# prometheus.io/port: ""
livenessProbe:
initialDelaySeconds:
timeoutSeconds:
readinessProbe:
initialDelaySeconds:
timeoutSeconds: ## Configure the service
## ref: http://kubernetes.io/docs/user-guide/services/
service:
## Specify a service type
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services---service-types
type: ClusterIP
port:
# nodePort: ssl:
enabled: false
secret: mysql-ssl-certs
certificates:
# - name: mysql-ssl-certs
# ca: |-
# -----BEGIN CERTIFICATE-----
# ...
# -----END CERTIFICATE-----
# cert: |-
# -----BEGIN CERTIFICATE-----
# ...
# -----END CERTIFICATE-----
# key: |-
# -----BEGIN RSA PRIVATE KEY-----
# ...
# -----END RSA PRIVATE KEY----- ## Populates the 'TZ' system timezone environment variable
## ref: https://dev.mysql.com/doc/refman/5.7/en/time-zone-support.html
##
## Default: nil (mysql will use image's default timezone, normally UTC)
## Example: 'Australia/Sydney'
# timezone: # To be added to the database server pod(s)
podAnnotations: {}

chart定义了一个PVC, 申请存储空间。 因为实验环境不支持动态供给,所以要先申请:

  kubectl  apply  -f mysql-pv.ymal              # 这个文件是自定义的。

接下来就可以安装chart了:

  2 定制化安装chart

   可以接受values.yml的默认值,也可定制化,比如设置mysqlRootPassword。Helm支持两种方法传递参数:

  (1)  指定自己的values文件, 通常做法是  helm inspect values mysql > myvalues.yaml生成values文件,然后设置mysqlRootPassword,最后执行

            helm install --values=myvalues.yaml  mysql

  (2) 使用--set 直接传入参数值

helm install stable/mysql    --set mysqlRootPassword=abc123-n myNAME: my

 

通过helm list  和  helm status   XXX 可以查看chart的最新状态。

11.5.4  升级和回滚release 

  helm upgrade                    #  可以对已经发布的release进行升级 通过--values 或 --set应用新的配置。

  

helm history my            # 可以查看所有版本

        helm   rollback  my 1    # 可以回滚到任何版本

  

  

  

  

  

  

 

第十一章 Helm-kubernetes的包管理器(中)的更多相关文章

  1. Helm:kubernetes应用包管理工具

    概要 Helm:kubernetes应用包管理工具 K8s部署应用的时候,应用会通过yaml描述信息调用K8s-api:Helm即是管理这些Yaml的应用包管理工具 组成 Helm包含5个部分 Hel ...

  2. 使用脚本在Linux服务器上自动安装Kubernetes的包管理器Helm

    Helm之于Kubernetes好比yum之于Red Hat Enterprise Linux,或者apt-get之于Ubuntu. Helm是由helm CLI和Tiller组成,是典型的Clien ...

  3. Kubernetes学习之路(二十五)之Helm程序包管理器

    目录 1.Helm的概念和架构 2.部署Helm (1)下载helm (2)部署Tiller 3.helm的使用 4.chart 目录结构 5.chart模板 6.定制安装MySQL chart (1 ...

  4. 第十一章 Helm-kubernetes的包管理器(上)

    Helm - K8s的包管理器 11.1 Why Helm K8s能够很好的组织和编排容器,但它缺少一个更高层次的应用打包工具,Helm就是干这个的. 比如对于一个MySQL服务,K8s需要部署如下对 ...

  5. kubernetes-helm程序包管理器(二十)

    helm概述 Helm是Kubernetes的包管理器,Helm 让我们能够像 yum 管理 rpm 包那样安装.部署.升级和删除容器化应用. Helm的核心术语: Chart:一个helm程序包,是 ...

  6. Android开发之通过包管理器获取安装应用信息

    最近在自己写一个APP,有一个模块需要获取手机应用的一些信息.坑还是有,但都基本踩过了,自己把他实现了出来,实现方法还是很需要掌握的.底部弹出的对话框中四个选项的实现不多做说明,主要讲讲如何获取这些安 ...

  7. Xrepo:一个现代化的跨平台 C/C++ 包管理器

    xrepo 是一个基于 Xmake 的跨平台 C/C++ 包管理器. 项目源码 官方文档 它基于 xmake 提供的运行时,但却是一个完整独立的包管理程序,相比 vcpkg/homebrew 此类包管 ...

  8. ASP.NET Core on K8S深入学习(10)K8S包管理器Helm

    本篇已加入<.NET Core on K8S学习实践系列文章索引>,可以点击查看更多容器化技术相关系列文章. 一.关于Helm 1.1 为何需要Helm? 虽然K8S能够很好地组织和编排容 ...

  9. 容器编排系统K8s之包管理器Helm基础使用

    前文我们了解了k8s上的hpa资源的使用,回顾请参考:https://www.cnblogs.com/qiuhom-1874/p/14293237.html:今天我们来聊一下k8s包管理器helm的相 ...

  10. Node.js包管理器Yarn的入门介绍与安装

    FAST, RELIABLE, AND SECURE DEPENDENCY MANAGEMENT. 就在昨天, Facebook 发布了新的 node.js 包管理器 Yarn 用以替代 npm .咱 ...

随机推荐

  1. 剑指offer--38.左旋转字符串

    时间限制:1秒 空间限制:32768K 热度指数:173814 本题知识点: 字符串 题目描述 汇编语言中有一种移位指令叫做循环左移(ROL),现在有个简单的任务,就是用字符串模拟这个指令的运算结果. ...

  2. 马士兵_JAVA自学之路(为那些目标模糊的码农们)

    转载自:http://blog.csdn.net/anlidengshiwei/article/details/42264301 JAVA自学之路 一:学会选择 为了就业,不少同学参加各种各样的培训. ...

  3. c# winform捕获全局异常,并记录日志

    using System; using System.Collections.Generic; using System.Linq; using System.Windows.Forms; using ...

  4. Spring核心概念(二)

    IOC/DI IOC(控制反转):对象(组件)的创建由代码中转移到外部容器(XML,注解) . DI(依赖注入):当类A需要使用类B时,那么我们需要为类A的属性赋值类B的对象. 这种现象我们称为依赖注 ...

  5. Lua的清屏快捷方式

    1. Lua (Command Line) 这里清屏的方式是: os.execute("cls") 就是执行了DOS中的清屏命令! 2.SciTE中的清屏方式: -----(1)第 ...

  6. vs 添加第三方库lib的两种方法

    方法一1.代码: 方法二2.配置: 首先包含头文件 #include “../DuiLib/UIlib.h” 连接器->常规-->附加库目录.即是将lib所在的目录,千万要记得,还要写一处 ...

  7. TCP 初步认识

    TCP连接的建立---三次握手 第一次握手:客户端TCP首先给服务器端TCP发送一个特殊的TCP数据段. 该数据段不包含应用层数据,并将头部中的SYN位设置为1,所以该数据段被称为SYN数据段. 另外 ...

  8. 手游服务端框架之使用Guava构建缓存系统

    缓存的作用与应用场景 缓存,在项目中的应用非常之广泛.诸如这样的场景,某些对象计算或者获取的代码比较昂贵,并且在程序里你不止一次要用到这些对象,那么,你就应该使用缓存. 缓存跟java的Coucurr ...

  9. 创建Azure Function

    azure function的用途在于运行一些逻辑简单的执行逻辑,比如batch job,定时任务,webhook等等.1. 创建azure function创建完毕后,进入app service,选 ...

  10. Vue学习笔记 ——computed VS methods

    对于最终的结果,两种方式确实是相同的.然而,不同的是计算属性是基于它们的依赖进行缓存的.计算属性只有在它的相关依赖发生改变时才会重新求值.这就意味着只要 message 还没有发生改变,多次访问 re ...