This is an automated email from the ASF dual-hosted git repository.
xiangfu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git
The following commit(s) were added to refs/heads/master by this push:
new b2b1852 Adding example for azure (#4781)
b2b1852 is described below
commit b2b185213f11ce1af6f83242d94573889459182f
Author: Xiang Fu <[email protected]>
AuthorDate: Mon Nov 4 10:21:44 2019 -0800
Adding example for azure (#4781)
---
kubernetes/examples/helm/README.md | 80 +++++++++++++++++++++++++++++++++
kubernetes/examples/helm/helm-rbac.yaml | 37 +++++++++++++++
2 files changed, 117 insertions(+)
diff --git a/kubernetes/examples/helm/README.md
b/kubernetes/examples/helm/README.md
index 2499488..2c8c280 100644
--- a/kubernetes/examples/helm/README.md
+++ b/kubernetes/examples/helm/README.md
@@ -70,6 +70,55 @@ GCLOUD_CLUSTER=pinot-quickstart
gcloud container clusters get-credentials ${GCLOUD_CLUSTER} --zone
${GCLOUD_ZONE} --project ${GCLOUD_PROJECT}
```
+
+## (Optional) Setup a Kubernetes cluster on Microsoft Azure
+
+### (Optional) Create a new k8s cluster on Azure
+
+- Install Azure CLI
(<https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest>)
+- Login to your Azure account.
+
+```bash
+az login
+```
+
+- Create Resource Group
+
+```bash
+AKS_RESOURCE_GROUP=pinot-demo
+AKS_RESOURCE_GROUP_LOCATION=eastus
+az group create --name ${AKS_RESOURCE_GROUP} --location
${AKS_RESOURCE_GROUP_LOCATION}
+```
+
+- Create an AKS cluster
+
+```bash
+AKS_RESOURCE_GROUP=pinot-demo
+AKS_CLUSTER_NAME=pinot-quickstart
+az aks create --resource-group ${AKS_RESOURCE_GROUP} --name
${AKS_CLUSTER_NAME} --node-count 3
+```
+
+(Optional) Please register default provider if above command failed for error:
`MissingSubscriptionRegistration`
+
+```bash
+az provider register --namespace Microsoft.Network
+```
+
+### (Optional) How to connect to an existing cluster
+
+Simply run below command to get the credential for the cluster you just
created or your existing cluster.
+
+```bash
+AKS_RESOURCE_GROUP=pinot-demo
+AKS_CLUSTER_NAME=pinot-quickstart
+az aks get-credentials --resource-group ${AKS_RESOURCE_GROUP} --name
${AKS_CLUSTER_NAME}
+```
+
+To verify the connection, you can run
+```bash
+kubectl get nodes
+```
+
## How to setup a Pinot cluster for demo
### Update helm dependency
@@ -84,6 +133,37 @@ helm dependency update
helm install --namespace "pinot-quickstart" --name "pinot" .
```
+#### Troubleshooting
+Error: Please run below command if encountering issue:
+
+```
+Error: could not find tiller".
+```
+
+Resolution:
+
+```bash
+kubectl -n kube-system delete deployment tiller-deploy
+kubectl -n kube-system delete service/tiller-deploy
+helm init --service-account tiller
+```
+
+Error: Please run below command if encountering permission issue:
+
+```Error: release pinot failed: namespaces "pinot-quickstart" is forbidden:
User "system:serviceaccount:kube-system:default" cannot get resource
"namespaces" in API group "" in the namespace "pinot-quickstart"```
+
+Resolution:
+
+```bash
+kubectl apply -f helm-rbac.yaml
+```
+
+#### To check deployment status
+
+```bash
+kubectl get all -n pinot-quickstart
+```
+
### Pinot Realtime QuickStart
#### Bring up a Kafka Cluster for realtime data ingestion
diff --git a/kubernetes/examples/helm/helm-rbac.yaml
b/kubernetes/examples/helm/helm-rbac.yaml
new file mode 100644
index 0000000..5df93ef
--- /dev/null
+++ b/kubernetes/examples/helm/helm-rbac.yaml
@@ -0,0 +1,37 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+ name: tiller
+ namespace: kube-system
+---
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRoleBinding
+metadata:
+ name: tiller
+roleRef:
+ apiGroup: rbac.authorization.k8s.io
+ kind: ClusterRole
+ name: cluster-admin
+subjects:
+ - kind: ServiceAccount
+ name: tiller
+ namespace: kube-system
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]