Migrate from helm 2 to helm 3 (#307)

Migrate from helm 2 to helm 3 to support the latest Dapr helm chart
This commit is contained in:
Young Bu Park 2020-01-31 16:11:06 -08:00 committed by GitHub
parent ae155b2b2f
commit 25797cc62c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 34 additions and 83 deletions

View File

@ -74,19 +74,19 @@ annotations:
### Setting system pods log level
When deploying Dapr to your cluster using Helm, you can individually set the log level for every Dapr system component.
When deploying Dapr to your cluster using Helm 3.x, you can individually set the log level for every Dapr system component.
#### Setting the Operator log level
`helm install dapr/dapr --name dapr --namespace dapr-system --set dapr_operator.logLevel=error`
`helm install dapr dapr/dapr --namespace dapr-system --set dapr_operator.logLevel=error`
#### Setting the Placement Service log level
`helm install dapr/dapr --name dapr --namespace dapr-system --set dapr_placement.logLevel=error`
`helm install dapr dapr/dapr --namespace dapr-system --set dapr_placement.logLevel=error`
#### Setting the Sidecar Injector log level
`helm install dapr/dapr --name dapr --namespace dapr-system --set dapr_sidecar_injector.logLevel=error`
`helm install dapr dapr/dapr --namespace dapr-system --set dapr_sidecar_injector.logLevel=error`
## Viewing Logs on Kubernetes

View File

@ -11,9 +11,9 @@ Dapr can use any Redis instance - containerized, running on your local dev machi
### Creating a Redis Cache in your Kubernetes Cluster using Helm
We can use [Helm](https://helm.sh/) to quickly create a Redis instance in our Kubernetes cluster. This approach requires [Installing Helm](https://github.com/helm/helm#install).
We can use [Helm](https://helm.sh/) to quickly create a Redis instance in our Kubernetes cluster. This approach requires [Installing Helm v3](https://github.com/helm/helm#install).
1. Install Redis into your cluster: `helm install stable/redis --name redis`.
1. Install Redis into your cluster: `helm install redis stable/redis`.
> Note that you need a Redis version greater than 5, which is what Dapr' pub/sub functionality requires. If you're intending on using Redis as just a state store (and not for pub/sub), also a lower version can be used.
2. Run `kubectl get pods` to see the Redis containers now running in your cluster.
3. Add `redis-master:6379` as the `redisHost` in your [redis.yaml](#configuration) file. For example:

View File

@ -30,8 +30,6 @@ az group create --name [your_resource_group] --location [region]
4. Create an Azure Kubernetes Service cluster
Use 1.13.x or newer version of Kubernetes with `--kubernetes-version`
> **Note:** [1.16.x Kubernetes doesn't work with helm < 2.15.0](https://github.com/helm/helm/issues/6374#issuecomment-537185486)
```bash
az aks create --resource-group [your_resource_group] --name [your_aks_cluster_name] --node-count 2 --kubernetes-version 1.14.6 --enable-addons http_application_routing --enable-rbac --generate-ssh-keys
```
@ -42,27 +40,8 @@ az aks create --resource-group [your_resource_group] --name [your_aks_cluster_na
az aks get-credentials -n [your_aks_cluster_name] -g [your_resource_group]
```
## (optional) Install Helm
## (optional) Install Helm v3
### Helm 3 installation (prefered)
1. [Install Helm v3 client](https://helm.sh/docs/intro/install/)
1. [Install Helm 3 client](https://helm.sh/docs/intro/install/)
### Helm 2 installation
1. [Install Helm 2 client](https://v2.helm.sh/docs/using_helm/#installing-helm)
2. Create the Tiller service account
```bash
kubectl apply -f https://raw.githubusercontent.com/Azure/helm-charts/master/docs/prerequisities/helm-rbac-config.yaml
```
3. Run the following to install Tiller into the cluster
```bash
helm init --service-account tiller --history-max 200
```
4. Ensure that Tiller is deployed and running
```bash
kubectl get pods -n kube-system
```
> **Note:** The latest Dapr helm chart no longer supports Helm v2. Please migrate from helm v2 to helm v3 by following [this guide](https://helm.sh/blog/migrate-from-helm-v2-to-helm-v3/).

View File

@ -36,39 +36,15 @@ minikube addons enable dashboard
minikube addons enable ingress
```
## (optional) Install Helm and deploy Tiller
## (optional) Install Helm v3
1. [Install Helm client](https://helm.sh/docs/using_helm/#installing-the-helm-client)
> **Note:** [1.16.x Kubernetes doesn't work with helm < 2.16.0, so use latest version of Helm](https://github.com/helm/helm/issues/6374#issuecomment-537185486)
1. [Install Helm v3 client](https://helm.sh/docs/intro/install/)
2. Create the Tiller service account
```bash
kubectl create serviceaccount -n kube-system tiller
kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller
```
3. Install Tiller to the minikube
```bash
helm init --service-account tiller --history-max 200
```
4. Ensure that Tiller is deployed and running
```bash
kubectl get pods -n kube-system
```
> **Note:** The latest Dapr helm chart no longer supports Helm v2. Please migrate from helm v2 to helm v3 by following [this guide](https://helm.sh/blog/migrate-from-helm-v2-to-helm-v3/).
### Troubleshooting
1. If Tiller is not running properly, get the logs from `tiller-deploy` deployment to understand the problem:
```bash
kubectl describe deployment tiller-deploy --namespace kube-system
```
2. The external IP address of load balancer is not shown from `kubectl get svc`
1. The external IP address of load balancer is not shown from `kubectl get svc`
In Minikube, EXTERNAL-IP in `kubectl get svc` shows `<pending>` state for your service. In this case, you can run `minikube service [service_name]` to open your service without external IP address.

View File

@ -140,11 +140,13 @@ $ dapr uninstall --kubernetes
### Using Helm (Advanced)
You can install Dapr to Kubernetes cluster using a Helm chart.
You can install Dapr to Kubernetes cluster using a Helm 3 chart.
> **Note:** The latest Dapr helm chart no longer supports Helm v2. Please migrate from helm v2 to helm v3 by following [this guide](https://helm.sh/blog/migrate-from-helm-v2-to-helm-v3/).
#### Install Dapr to Kubernetes
1. Make sure Helm is initialized in your running Kubernetes cluster.
1. Make sure Helm 3 is installed on your machine
2. Add Azure Container Registry as a Helm repo
@ -153,18 +155,16 @@ helm repo add dapr https://daprio.azurecr.io/helm/v1/repo
helm repo update
```
3. Install the Dapr chart on your cluster in the `dapr-system` namespace.
3. Create `dapr-system` namespace on your kubernetes cluster
Helm 3 is the latest stable major release and is preferred. The installation command differs slightly between Helm 2 and Helm 3. You can determine the version of Helm you are using by running the `helm version` command.
Use the following command to install the dapr chart using Helm 3.
```bash
helm install dapr dapr/dapr --namespace dapr-system
```
kubectl create namespace dapr-system
```
Use the following command to install the dapr chart using Helm 2.
4. Install the Dapr chart on your cluster in the `dapr-system` namespace.
```bash
helm install dapr/dapr --name dapr --namespace dapr-system
helm install dapr dapr/dapr --namespace dapr-system
```
#### Verify installation
@ -187,9 +187,4 @@ Helm 3
helm uninstall dapr -n dapr-system
```
Helm 2
```bash
helm del --purge -n dapr
```
> **Note:** See [here](https://github.com/dapr/dapr/blob/master/charts/dapr/README.md) for details on Dapr helm charts.

View File

@ -16,7 +16,7 @@ You can install Kafka in your cluster by using Helm:
```
$ helm repo add incubator http://storage.googleapis.com/kubernetes-charts-incubator
$ helm install --name my-kafka incubator/kafka
$ helm install my-kafka incubator/kafka
```
Next, we'll create the Dapr Kafka binding for Kubernetes.<br>

View File

@ -15,7 +15,7 @@ You can then interact with the server using the client port: `localhost:4222`.
The easiest way to install NATS on Kubernetes is by using the [Helm chart](https://github.com/helm/charts/tree/master/stable/nats):
```
helm install --name nats stable/nats
helm install nats stable/nats
```
This will install NATS into the `default` namespace.

View File

@ -15,7 +15,7 @@ You can then interact with the server using the client port: `localhost:5672`.
The easiest way to install RabbitMQ on Kubernetes is by using the [Helm chart](https://github.com/helm/charts/tree/master/stable/rabbitmq):
```
helm install --name rabbitmq stable/rabbitmq
helm install rabbitmq stable/rabbitmq
```
Look at the chart output and get the username and password.

View File

@ -13,7 +13,7 @@ The Redis instance will be installed via Docker when you run `dapr init`, and th
We can use [Helm](https://helm.sh/) to quickly create a Redis instance in our Kubernetes cluster. This approach requires [Installing Helm](https://github.com/helm/helm#install).
1. Install Redis into your cluster: `helm install stable/redis --name redis --set image.tag=5.0.5-debian-9-r104`. Note that we're explicitly setting an image tag to get a version greater than 5, which is what Dapr' pub/sub functionality requires.
1. Install Redis into your cluster: `helm install redis stable/redis`. Note that we're explicitly setting an image tag to get a version greater than 5, which is what Dapr' pub/sub functionality requires.
2. Run `kubectl get pods` to see the Redis containers now running in your cluster.
3. Add `redis-master:6379` as the `redisHost` in your redis.yaml file. For example:
```yaml

View File

@ -15,7 +15,8 @@ You can then interact with the server using `localhost:9042`.
The easiest way to install Cassandra on Kubernetes is by using the [Helm chart](https://github.com/helm/charts/tree/master/incubator/cassandra):
```
helm install --namespace "cassandra" -n "cassandra" incubator/cassandra
kubectl create namespace cassandra
helm install cassandra incubator/cassandra --namespace cassandra
```
This will install Cassandra into the `cassandra` namespace by default.

View File

@ -15,7 +15,7 @@ You can then interact with the server using `localhost:8500`.
The easiest way to install Consul on Kubernetes is by using the [Helm chart](https://github.com/helm/charts/tree/master/stable/consul):
```
helm install --name consul stable/consul
helm install consul stable/consul
```
This will install Consul into the `default` namespace.

View File

@ -16,7 +16,7 @@ The easiest way to install etcd on Kubernetes is by using the [Helm chart](https
```
helm repo add incubator http://storage.googleapis.com/kubernetes-charts-incubator
helm install --name etcd incubator/etcd
helm install etcd incubator/etcd
```
This will install etcd into the `default` namespace.

View File

@ -15,7 +15,7 @@ You can then interact with the server using `localhost:11211`.
The easiest way to install Memcached on Kubernetes is by using the [Helm chart](https://github.com/helm/charts/tree/master/stable/memcached):
```
helm install --name memcached stable/memcached
helm install memcached stable/memcached
```
This will install Memcached into the `default` namespace.

View File

@ -15,7 +15,7 @@ You can then interact with the server using `localhost:27017`.
The easiest way to install MongoDB on Kubernetes is by using the [Helm chart](https://github.com/helm/charts/tree/master/stable/mongodb):
```
helm install --name mongo stable/mongodb
helm install mongo stable/mongodb
```
This will install MongoDB into the `default` namespace.

View File

@ -16,7 +16,7 @@ The easiest way to install Zookeeper on Kubernetes is by using the [Helm chart](
```
helm repo add incubator http://storage.googleapis.com/kubernetes-charts-incubator
helm install --name zookeeper incubator/zookeeper
helm install zookeeper incubator/zookeeper
```
This will install Zookeeper into the `default` namespace.