This is an automated email from the ASF dual-hosted git repository.
ulyssesyou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-kyuubi.git
The following commit(s) were added to refs/heads/master by this push:
new 3968832 [KYUUBI #1454] Add Doc About Deploy Kyuubi On Kubernetes
3968832 is described below
commit 3968832815233b5afed8e987d6ee11dfc7c673d5
Author: zwangsheng <[email protected]>
AuthorDate: Mon Nov 29 14:15:19 2021 +0800
[KYUUBI #1454] Add Doc About Deploy Kyuubi On Kubernetes
<!--
Thanks for sending a pull request!
Here are some tips for you:
1. If this is your first time, please read our contributor guidelines:
https://kyuubi.readthedocs.io/en/latest/community/contributions.html
2. If the PR is related to an issue in
https://github.com/apache/incubator-kyuubi/issues, add '[KYUUBI #XXXX]' in your
PR title, e.g., '[KYUUBI #XXXX] Your PR title ...'.
3. If the PR is unfinished, add '[WIP]' in your PR title, e.g.,
'[WIP][KYUUBI #XXXX] Your PR title ...'.
-->
### _Why are the changes needed?_
<!--
Please clarify why the changes are needed. For instance,
1. If you add a feature, you can talk about the use case of it.
2. If you fix a bug, you can clarify why it is a bug.
-->
The Kyuubi documentation is missing about deploying Kyuubi on Kubernetes.
### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including
negative and positive cases if possible
- [ ] Add screenshots for manual tests if appropriate
- [x] [Run
test](https://kyuubi.readthedocs.io/en/latest/develop_tools/testing.html#running-tests)
locally before make a pull request
Closes #1457 from zwangsheng/doc/kyuubi_on_k8s.
Closes #1454
f916866f [zwangsheng] modify .html to .md
707368ce [zwangsheng] fix url & add todo
1a509781 [zwangsheng] Fix spelling
a624a602 [zwangsheng] fix
4ca74164 [zwangsheng] rename & add
Authored-by: zwangsheng <[email protected]>
Signed-off-by: ulysses-you <[email protected]>
---
.../{on_kubernetes.md => engine_on_kubernetes.md} | 0
docs/deployment/{on_yarn.md => engine_on_yarn.md} | 0
docs/deployment/index.rst | 5 +-
docs/deployment/kyuubi_on_kubernetes.md | 101 +++++++++++++++++++++
4 files changed, 104 insertions(+), 2 deletions(-)
diff --git a/docs/deployment/on_kubernetes.md
b/docs/deployment/engine_on_kubernetes.md
similarity index 100%
rename from docs/deployment/on_kubernetes.md
rename to docs/deployment/engine_on_kubernetes.md
diff --git a/docs/deployment/on_yarn.md b/docs/deployment/engine_on_yarn.md
similarity index 100%
rename from docs/deployment/on_yarn.md
rename to docs/deployment/engine_on_yarn.md
diff --git a/docs/deployment/index.rst b/docs/deployment/index.rst
index 425388c..9ff9ee0 100644
--- a/docs/deployment/index.rst
+++ b/docs/deployment/index.rst
@@ -29,8 +29,9 @@ Basics
:numbered: 3
:glob:
- on_yarn
- on_kubernetes
+ engine_on_yarn
+ engine_on_kubernetes
+ kyuubi_on_kubernetes
hive_metastore
high_availability_guide
metrics
diff --git a/docs/deployment/kyuubi_on_kubernetes.md
b/docs/deployment/kyuubi_on_kubernetes.md
new file mode 100644
index 0000000..b6e4fe9
--- /dev/null
+++ b/docs/deployment/kyuubi_on_kubernetes.md
@@ -0,0 +1,101 @@
+<!--
+ - 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.
+ -->
+
+<div align=center>
+
+
+
+</div>
+
+# Deploy Kyuubi On Kubernetes
+
+## Requirements
+
+If you want to deploy Kyuubi on Kubernetes, you'd better get a sense of the
following things.
+
+* Use Kyuubi official docker image or build Kyuubi docker image
+* An active Kubernetes cluster
+* Reading About [Deploy Kyuubi engines on Kubernetes](engine_on_kubernetes.md)
+* [Kubectl](https://kubernetes.io/docs/reference/kubectl/overview/)
+* KubeConfig of the target cluster
+
+## Kyuubi Official Docker Image
+
+You can find the official docker image at [Apache Kyuubi (Incubating) Docker
Hub](https://registry.hub.docker.com/r/apache/kyuubi).
+
+## Build Kyuubi Docker Image
+
+You can build custom Docker images from the
`${KYUUBI_HOME}/bin/docker-image-tool.sh` contained in the binary package.
+
+Examples:
+```shell
+ - Build and push image with tag "v1.4.0" to docker.io/myrepo
+ $0 -r docker.io/myrepo -t v1.4.0 build
+ $0 -r docker.io/myrepo -t v1.4.0 push
+
+ - Build and push with tag "v3.0.0" and Spark-3.1.2 as base image to
docker.io/myrepo
+ $0 -r docker.io/myrepo -t v3.0.0 -b BASE_IMAGE=repo/spark:3.1.2 build
+ $0 -r docker.io/myrepo -t v3.0.0 push
+
+ - Build and push for multiple archs to docker.io/myrepo
+ $0 -r docker.io/myrepo -t v3.0.0 -X build
+
+ - Build with Spark placed "/path/spark"
+ $0 -s /path/spark build
+```
+
+`${KYUUBI_HOME}/bin/docker-image-tool.sh` use `Kyuubi Version` as default
docker tag and always build `${repo}/kyuubi:${tag}` image.
+
+The script can also help build external Spark into a Kyuubi image that acts as
a client for submitting tasks by `-s ${SPAAK_HOME}`.
+
+## Deploy
+
+Multiple YAML files are provided under `${KYUUBI_HOME}/docker/` to help you
deploy Kyuubi.
+
+You can deploy single-node Kyuubi through
`${KYUUBI_HOME}/docker/kyuubi-pod.yaml` or
`${KYUUBI_HOME}/docker/kyuubi-deployment.yaml`.
+
+Also, you can use `${KYUUBI_HOME}/docker/kyuubi-service.yaml` to deploy Kyuubi
Service.
+
+## Config
+
+You can configure Kyuubi the old-fashioned way by placing kyuubi-default.conf
inside the image. Kyuubi do not recommend using this way on Kubernetes.
+
+Kyuubi provide `${KYUUBI_HOME}/docker/kyuubi-configmap.yaml` to build
Configmap for Kyuubi.
+
+You can find out how to use it in the comments inside the above file.
+
+If you want to know kyuubi engine on kubernetes configurations, you can refer
to [Deploy Kyuubi engines on Kubernetes](engine_on_kubernetes.md)
+
+## Connect
+
+If you do not use Service or HostNetwork to get the IP address of the node
where Kyuubi deployed.
+You should connect like:
+```shell
+kubectl exec -it kyuubi-example -- /bin/bash
+${SPARK_HOME}/bin/beeline -u 'jdbc:hive2://localhost:10009'
+```
+
+Or you can submit tasks directly through local beeline:
+```shell
+${SPARK_HOME}/bin/beeline -u 'jdbc:hive2://${hostname}:${port}'
+```
+As using service nodePort, port means nodePort and hostname means any hostname
of kubernetes node.
+
+As using HostNetwork, port means kyuubi containerPort and hostname means
hostname of node where Kyuubi deployed.
+
+## TODO
+Kyuubi will provide other connection methods in the future, like `Ingress`,
`Load Balance`.