helm create mychart | 새 차트 생성 |
helm package mychart | 차트 패키징 |
helm lint mychart | 차트 검사 |
helm template mychart | 템플릿 렌더링 |
helm dependency update | 의존성 업데이트 |
helm show values repo/chart | 기본 값 표시 |
helm show chart repo/chart | 차트 정보 표시 |
helm install myrelease repo/chart | 차트 설치 |
helm install myrelease . -f values.yaml | 커스텀 값으로 설치 |
helm install myrelease . --set key=value | 값 설정하여 설치 |
helm install myrelease . --dry-run | 드라이 런 설치 |
helm upgrade myrelease repo/chart | 릴리스 업그레이드 |
helm upgrade --install myrelease repo/chart | 설치 또는 업그레이드 |
helm rollback myrelease 1 | 리비전으로 롤백 |
helm uninstall myrelease | 릴리스 삭제 |
helm list | 릴리스 목록 |
helm list -A | 모든 네임스페이스 |
helm status myrelease | 릴리스 상태 |
helm history myrelease | 릴리스 히스토리 |
helm get values myrelease | 릴리스 값 가져오기 |
helm get manifest myrelease | 릴리스 매니페스트 |
helm repo add name url | 저장소 추가 |
helm repo list | 저장소 목록 |
helm repo update | 저장소 업데이트 |
helm repo remove name | 저장소 제거 |
helm search repo keyword | 저장소에서 검색 |
helm search hub keyword | Artifact Hub 검색 |
mychart/
├── Chart.yaml # Chart metadata
├── values.yaml # Default values
├── charts/ # Dependencies
├── templates/ # Kubernetes manifests
│ ├── deployment.yaml
│ ├── service.yaml
│ ├── ingress.yaml
│ ├── _helpers.tpl # Template helpers
│ ├── NOTES.txt # Post-install notes
│ └── tests/
└── .helmignore apiVersion: v2
name: mychart
version: 1.0.0
appVersion: "1.16.0"
description: My application chart
type: application
keywords:
- web
- app
maintainers:
- name: John Doe
email: john@example.com
dependencies:
- name: postgresql
version: "12.x.x"
repository: "https://charts.bitnami.com/bitnami"
condition: postgresql.enabled replicaCount: 1
image:
repository: nginx
tag: "1.21"
pullPolicy: IfNotPresent
service:
type: ClusterIP
port: 80
ingress:
enabled: false
hosts:
- host: chart.local
paths:
- path: /
resources:
limits:
cpu: 100m
memory: 128Mi
requests:
cpu: 100m
memory: 128Mi
nodeSelector: {}
tolerations: []
affinity: {} {{ .Values.replicaCount }}
{{ .Values.image.repository }} {{ .Release.Name }}
{{ .Release.Namespace }}
{{ .Chart.Name }}
{{ .Chart.Version }}
{{ .Capabilities.KubeVersion }} {{- if .Values.ingress.enabled }}
# ingress config
{{- end }}
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }} {{- range .Values.ingress.hosts }}
- host: {{ .host }}
{{- end }}
{{- range $key, $value := .Values.env }}
- name: {{ $key }}
value: {{ $value | quote }}
{{- end }} {{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 2 }}
{{- end }} {{ .Values.name | quote }}
{{ .Values.name | upper }}
{{ .Values.name | lower }}
{{ .Values.name | title }}
{{ .Values.name | trim }}
{{ .Values.name | default "default" }} {{ include "mychart.fullname" . }}
{{- include "mychart.labels" . | nindent 4 }} {{ required "A valid name is required!" .Values.name }} resources:
{{- toYaml .Values.resources | nindent 2 }} {{ .Values.config | indent 4 }}
{{ .Values.config | nindent 4 }} {{/*
Create a default fully qualified app name.
*/}}
{{- define "mychart.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name .Chart.Name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{/*
Common labels
*/}}
{{- define "mychart.labels" -}}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }}
app.kubernetes.io/name: {{ include "mychart.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}