Docs/CloudNative/Kubernetes/Helm/基础知识.md
2022-10-18 16:59:37 +08:00

37 lines
No EOL
657 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#### 创建空白应用
```
helm create helm-demo
```
生成目录结构如下:
```
helm
|--charts
|--Chart.yaml ## helm的基本信息包括版本与名称等
|--templates ## 应用需要的各种kubernetes的相关
| |--deployment.yaml
| |--_helpers.tpl
| |--ingress.yaml
| |--NOTES.txt
| |--service.yaml
|--values.yaml ## 配置文件信息
```
#### 检查语法错误
```
helm lint --strict helm-demo
```
#### 打包文件
```
helm package helm-demo
```
#### 安装测试
```
helm install helm-demo-test helm-demo-0.1.0.tgz
```
#### 映射端口,在本地测试
```
kubectl port-forward helm-demo-test-xxxs2e3e3 8080:80
```