# Helm 으로 k8s 에 앱 배포하기

## ⚡️  Locally Render Templates with values

* Render chart templates locally and display the output.
* This does not require Tiller. \
  However, any values that would normally be looked up or retrieved in-cluster will be faked locally.&#x20;
* Additionally, none of the server-side testing of chart validity (e.g. whether an API is supported) is done.

**Format**

```
helm template [flags] CHART
```

**Options**

```
-f, --values valueFiles        specify values in a YAML file (can specify multiple) (default [])
```

**Command**

```bash
$ helm template ./myapp -f ./myapp/values.yaml -f ./myapp/overrides/alpha.yaml
```

## ⚡️  **Validation & k8s dry-run 해보기**&#x20;

```bash
$ helm template ./myapp -f ./myapp/values.yaml -f ./myapp/overrides/alpha.yaml | kubectl apply -f - --dry-run=true --validate=true
```

## ⚡️  k8s Cluster 에 앱 띄우기

```bash
$ helm template ./myapp -f ./myapp/values.yaml -f ./myapp/overrides/alpha.yaml | kubectl apply -f - --validate=true
```

## ⚡️  Packaging 하기&#x20;

* package a chart directory into a chart archive

```bash
$ helm package myapp
```

📄 **참고 문서**

* <https://sktelecom-oslab.github.io/Virtualization-Software-Lab/Helm/>
