This is an automated email from the ASF dual-hosted git repository.
chengpan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kyuubi.git
The following commit(s) were added to refs/heads/master by this push:
new 2c9fb3dd0 [KYUUBI #6080] Improve instruction for deploy Kyuubi on K8s
2c9fb3dd0 is described below
commit 2c9fb3dd027eda65ec30e2c83c07c5ec9976f429
Author: Cheng Pan <[email protected]>
AuthorDate: Mon Feb 26 13:40:32 2024 +0800
[KYUUBI #6080] Improve instruction for deploy Kyuubi on K8s
# :mag: Description
## Issue References ๐
Historically, we provided a few standalone YAML files to allow users to
deploy Kyuubi on K8s, and later a Helm Chart was introduced, which is a simple
and mature way for production use cases.
## Describe Your Solution ๐ง
Remove the legacy standalone YAML files way and update docs to guide user
to use Helm chart to deploy Kyuubi on K8s.
## Types of changes :bookmark:
- [ ] Bugfix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
## Test Plan ๐งช
Review
---
# Checklist ๐
- [x] This patch was not authored or co-authored using [Generative
Tooling](https://www.apache.org/legal/generative-tooling.html)
**Be nice. Be informative.**
Closes #6080 from pan3793/k8s-cleanup.
Closes #6080
3a9fa9be3 [Cheng Pan] comment
8f681d28c [Cheng Pan] Improve instruction for deploy Kyuubi on K8s
Authored-by: Cheng Pan <[email protected]>
Signed-off-by: Cheng Pan <[email protected]>
---
.github/workflows/master.yml | 2 +-
.github/workflows/publish-snapshot-docker.yml | 2 +-
bin/docker-image-tool.sh | 18 +++----
build/{Dockerfile => Dockerfile.CI} | 6 ++-
docker/Dockerfile | 14 +++---
docker/kyuubi-configmap.yaml | 55 ---------------------
docker/kyuubi-deployment.yaml | 70 ---------------------------
docker/kyuubi-pod.yaml | 70 ---------------------------
docker/kyuubi-service.yaml | 41 ----------------
docs/deployment/engine_on_kubernetes.md | 39 +++++++--------
docs/deployment/kyuubi_on_kubernetes.md | 43 ++++++++--------
docs/quick_start/quick_start.rst | 17 ++++---
docs/quick_start/quick_start_with_helm.md | 18 +++----
13 files changed, 79 insertions(+), 316 deletions(-)
diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml
index 42ac6e37c..b3fb71081 100644
--- a/.github/workflows/master.yml
+++ b/.github/workflows/master.yml
@@ -428,7 +428,7 @@ jobs:
CI=${CI}
MVN_ARG=--flink-provided --hive-provided -Dmaven.javadoc.skip=true
-Drat.skip=true -Dscalastyle.skip=true -Dspotless.check.skip -DskipTests
context: .
- file: build/Dockerfile
+ file: build/Dockerfile.CI
load: true
tags: apache/kyuubi:latest
- name: Cache Engine Archives
diff --git a/.github/workflows/publish-snapshot-docker.yml
b/.github/workflows/publish-snapshot-docker.yml
index a7df6135f..67d56f102 100644
--- a/.github/workflows/publish-snapshot-docker.yml
+++ b/.github/workflows/publish-snapshot-docker.yml
@@ -46,7 +46,7 @@ jobs:
cache-from: type=gha
cache-to: type=gha,mode=max
context: .
- file: build/Dockerfile
+ file: build/Dockerfile.CI
platforms: linux/amd64,linux/arm64
push: true
tags: apache/kyuubi:master-snapshot
diff --git a/bin/docker-image-tool.sh b/bin/docker-image-tool.sh
index 14d5fe7b0..e85b9a543 100755
--- a/bin/docker-image-tool.sh
+++ b/bin/docker-image-tool.sh
@@ -177,16 +177,16 @@ Options:
Examples:
- - 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 image with tag "v1.8.1" to docker.io/myrepo
+ $0 -r docker.io/myrepo -t v1.8.1 build
+ $0 -r docker.io/myrepo -t v1.8.1 push
- - Build and push with tag "v1.4.0" and Spark-3.2.1 as base image to
docker.io/myrepo
- $0 -r docker.io/myrepo -t v1.4.0 -b BASE_IMAGE=repo/spark:3.2.1 build
- $0 -r docker.io/myrepo -t v1.4.0 push
+ - Build and push with tag "v1.8.1" and Spark-3.5.1 as base image to
docker.io/myrepo
+ $0 -r docker.io/myrepo -t v1.8.1 -b BASE_IMAGE=repo/spark:3.5.1 build
+ $0 -r docker.io/myrepo -t v1.8.1 push
- Build and push for multiple archs to docker.io/myrepo
- $0 -r docker.io/myrepo -t v1.4.0 -X build
+ $0 -r docker.io/myrepo -t v1.8.1 -X build
# Note: buildx, which does cross building, needs to do the push during
build
# So there is no separate push step with -X
@@ -194,8 +194,8 @@ Examples:
- Build with Spark placed "/path/spark"
$0 -s /path/spark build
- - Build with Spark Image myrepo/spark:3.1.0
- $0 -S /opt/spark -b BASE_IMAGE=myrepo/spark:3.1.0 build
+ - Build with Spark Image myrepo/spark:3.4.2
+ $0 -S /opt/spark -b BASE_IMAGE=myrepo/spark:3.4.2 build
EOF
}
diff --git a/build/Dockerfile b/build/Dockerfile.CI
similarity index 95%
rename from build/Dockerfile
rename to build/Dockerfile.CI
index 8ecc6c8b7..2ce8191fa 100644
--- a/build/Dockerfile
+++ b/build/Dockerfile.CI
@@ -15,12 +15,14 @@
# limitations under the License.
#
+# This Dockerfile is for CI testing purpose, not for end-users
+
# Usage:
# Run the docker command below
# docker build \
# --build-arg MVN_ARG="-Pspark-3.1,spark-hadoop-3.2" \
-# --file build/Dockerfile \
-# --tag apache/kyuubi:tagname \
+# --file build/Dockerfile.CI \
+# --tag apache/kyuubi:<tag> \
# .
# Options:
# -f, --file this docker file
diff --git a/docker/Dockerfile b/docker/Dockerfile
index 0440022de..88adcbe65 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -15,14 +15,12 @@
# limitations under the License.
#
-# Usage:
-# 1. use ./build/dist to make binary distributions of Kyuubi or download a
release
-# 2. Untar it and run the docker command below
-# docker build -f docker/Dockerfile -t repository/kyuubi:tagname .
-# Options:
-# -f this docker file
-# -t the target repo and tag name
-# more options can be found with -h
+# It's recommended to use ./bin/docker-image-tool.sh to build the image rather
than the vanilla docker command.
+
+# Usage (use vanilla docker command):
+# 1. use ./build/dist to make binary tarball of Kyuubi or download an
official binary tarball
+# 2. untar it and run the docker command below
+# docker build -f docker/Dockerfile -t <private-repo>/kyuubi:<tag> .
ARG BASE_IMAGE=eclipse-temurin:8-jdk-focal
ARG spark_provided="spark_builtin"
diff --git a/docker/kyuubi-configmap.yaml b/docker/kyuubi-configmap.yaml
deleted file mode 100644
index 6a6d430ce..000000000
--- a/docker/kyuubi-configmap.yaml
+++ /dev/null
@@ -1,55 +0,0 @@
-#
-# 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.
-#
-
-# Usage:
-# DEMO:
-# kubectl apply -f
https://raw.githubusercontent.com/apache/kyuubi/master/docker/kyuubi-configmap.yaml
-# LOCAL:
-# kubectl create cm kyuubi-defaults
--from-file=${KYUUBI_HOME}/conf/kyuubi-defaults.conf
-
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: kyuubi-defaults
-data:
- kyuubi-defaults.conf: |
- #
- # 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.
- #
-
- ## Kyuubi Configurations
-
- #
- # kyuubi.authentication NONE
- # kyuubi.frontend.bind.host localhost
- # kyuubi.frontend.bind.port 10009
- #
-
- # Details in
https://kyuubi.readthedocs.io/en/master/configuration/settings.html
diff --git a/docker/kyuubi-deployment.yaml b/docker/kyuubi-deployment.yaml
deleted file mode 100644
index 12f52b576..000000000
--- a/docker/kyuubi-deployment.yaml
+++ /dev/null
@@ -1,70 +0,0 @@
-#
-# 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.
-#
-
-# Usage:
-# ConfigMap:
-# DEMO:
-# kubectl apply -f
https://raw.githubusercontent.com/apache/kyuubi/master/docker/kyuubi-configmap.yaml
-# LOCAL:
-# kubectl create cm kyuubi-defaults
--from-file=${KYUUBI_HOME}/conf/kyuubi-defaults.conf
-# Start:
-# kubectl apply -f
https://raw.githubusercontent.com/apache/kyuubi/master/docker/kyuubi-deployment.yaml
-# Expose port with NodePort:
-# see usage of kyuubi-service.yaml
-# Config change:
-# 1. edit ConfigMap
-# kubectl edit cm kyuubi-defaults
-# 2. restart deployment
-# kubectl delete -f
https://raw.githubusercontent.com/apache/kyuubi/master/docker/kyuubi-deployment.yaml
-# kubectl apply -f
https://raw.githubusercontent.com/apache/kyuubi/master/docker/kyuubi-deployment.yaml
-
-apiVersion: apps/v1
-kind: Deployment
-metadata:
- name: kyuubi-deployment-example
- labels:
- app: kyuubi-server
-spec:
- replicas: 3
- selector:
- matchLabels:
- app: kyuubi-server
- template:
- metadata:
- labels:
- app: kyuubi-server
- spec:
- serviceAccountName: default
- containers:
- - name: kyuubi-server
- # TODO: replace this with the stable tag
- image: apache/kyuubi:master-snapshot
- imagePullPolicy: Always
- env:
- - name: KYUUBI_JAVA_OPTS
- value: -Dkyuubi.frontend.bind.host=0.0.0.0
- ports:
- - name: frontend-port
- containerPort: 10009
- protocol: TCP
- volumeMounts:
- - name: kyuubi-defaults
- mountPath: /opt/kyuubi/conf
- volumes:
- - name: kyuubi-defaults
- configMap:
- name: kyuubi-defaults
diff --git a/docker/kyuubi-pod.yaml b/docker/kyuubi-pod.yaml
deleted file mode 100644
index 8eacd8a6b..000000000
--- a/docker/kyuubi-pod.yaml
+++ /dev/null
@@ -1,70 +0,0 @@
-#
-# 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.
-#
-
-# Usage:
-# ConfigMap:
-# DEMO:
-# kubectl apply -f
https://raw.githubusercontent.com/apache/kyuubi/master/docker/kyuubi-configmap.yaml
-# LOCAL:
-# kubectl create cm kyuubi-defaults
--from-file=${KYUUBI_HOME}/conf/kyuubi-defaults.conf
-# Start:
-# kubectl apply -f
https://raw.githubusercontent.com/apache/kyuubi/master/docker/kyuubi-pod.yaml
-# Expose port:
-# 1. Expose the Pod by port-forward, for temporary test
-# kubectl port-forward kyuubi-example --address localhost 10009:10009
-# Connect:
-# kubectl exec -it kyuubi-example -- /bin/bash
-#
-# ${SPARK_HOME}/bin/beeline -u 'jdbc:hive2://localhost:10009'
-# 2. Expose the Pod as a service with NodePort
-# see usage of kyuubi-service.yaml
-# Logging:
-# kubectl logs -f kyuubi-example
-# Config change:
-# 1. edit ConfigMap
-# kubectl edit cm kyuubi-defaults
-# 2. restart pod
-# kubectl delete -f
https://raw.githubusercontent.com/apache/kyuubi/master/docker/kyuubi-pod.yaml
-# kubectl apply -f
https://raw.githubusercontent.com/apache/kyuubi/master/docker/kyuubi-pod.yaml
-
-apiVersion: v1
-kind: Pod
-metadata:
- name: kyuubi-example
- labels:
- app: kyuubi-server
-spec:
- serviceAccountName: default
- containers:
- - name: kyuubi-server
- # TODO: replace this with the stable tag
- image: apache/kyuubi:master-snapshot
- imagePullPolicy: Always
- env:
- - name: KYUUBI_JAVA_OPTS
- value: -Dkyuubi.frontend.bind.host=0.0.0.0
- ports:
- - name: frontend-port
- containerPort: 10009
- protocol: TCP
- volumeMounts:
- - name: kyuubi-defaults
- mountPath: /opt/kyuubi/conf
- volumes:
- - name: kyuubi-defaults
- configMap:
- name: kyuubi-defaults
diff --git a/docker/kyuubi-service.yaml b/docker/kyuubi-service.yaml
deleted file mode 100644
index 396d49017..000000000
--- a/docker/kyuubi-service.yaml
+++ /dev/null
@@ -1,41 +0,0 @@
-#
-# 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.
-#
-
-# Usage:
-# Start:
-# kubectl apply -f
https://raw.githubusercontent.com/apache/kyuubi/master/docker/kyuubi-service.yaml
-# Connect:
-# ${SPARK_HOME}/bin/beeline -u
'jdbc:hive2://${any_hostname_of_k8s_nodes}:30009'
-
-apiVersion: v1
-kind: Service
-metadata:
- name: kyuubi-example-service
-spec:
- ports:
- # The default port limit is 30000-32767
- # to change:
- # vim kube-apiserver.yaml (usually under path:
/etc/kubernetes/manifests/)
- # add or change line 'service-node-port-range=1-32767' under
kube-apiserver
- - nodePort: 30009
- # same of containerPort in pod yaml
- port: 10009
- protocol: TCP
- type: NodePort
- selector:
- # same of pod label
- app: kyuubi-server
\ No newline at end of file
diff --git a/docs/deployment/engine_on_kubernetes.md
b/docs/deployment/engine_on_kubernetes.md
index a8f7c6ca0..7d94286bd 100644
--- a/docs/deployment/engine_on_kubernetes.md
+++ b/docs/deployment/engine_on_kubernetes.md
@@ -19,18 +19,18 @@
## Requirements
-When you want to run Kyuubi's Spark SQL engines on Kubernetes, you'd better
have cognition upon the following things.
+When you want to run Kyuubi's Spark SQL engine on Kubernetes, you'd better
have cognition upon the following things.
-* Read about [Running Spark On
Kubernetes](https://spark.apache.org/docs/latest/running-on-kubernetes.html)
+* Read about [Running Spark on
Kubernetes](https://spark.apache.org/docs/latest/running-on-kubernetes.html)
* An active Kubernetes cluster
-* [Kubectl](https://kubernetes.io/docs/reference/kubectl/overview/)
-* KubeConfig of the target cluster
+* [kubectl](https://kubernetes.io/docs/reference/kubectl/overview/)
+*
[kubeconfig](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/)
of the target cluster
## Configurations
### Master
-Spark on Kubernetes config master by using a special format.
+Spark on Kubernetes configures `spark.master` by using a special format.
`spark.master=k8s://https://<k8s-apiserver-host>:<k8s-apiserver-port>`
@@ -39,12 +39,13 @@ You can use cmd `kubectl cluster-info` to get api-server
host and port.
### Deploy Mode
One of the main advantages of the Kyuubi server compared to other interactive
Spark clients is that it supports cluster deploy mode.
-It is highly recommended to run Spark in k8s in cluster mode.
+It means that the Spark driver runs in an independent Pod which is isolated to
Kyuubi server's pod.
+It is highly recommended to run Spark on K8s in cluster mode.
The minimum required configurations are:
-* spark.submit.deployMode (cluster)
-* spark.kubernetes.file.upload.path (path on s3 or hdfs)
+* spark.submit.deployMode cluster
+* spark.kubernetes.file.upload.path (path on S3 or HDFS)
* spark.kubernetes.authenticate.driver.serviceAccountName ([viz
ServiceAccount](#serviceaccount))
### Docker Image
@@ -56,14 +57,14 @@ When deploying Kyuubi engines against a Kubernetes cluster,
we need to set up th
Example usage is:
```shell
-./bin/docker-image-tool.sh -r <repo> -t my-tag build
-./bin/docker-image-tool.sh -r <repo> -t my-tag push
+./bin/docker-image-tool.sh -r <repo> -t <tag> build
+./bin/docker-image-tool.sh -r <repo> -t <tag> push
# To build docker image with specify openJdk
-./bin/docker-image-tool.sh -r <repo> -t my-tag -b
java_image_tag=<openjdk:${java_image_tag}> build
+./bin/docker-image-tool.sh -r <repo> -t <tag> -b
java_image_tag=<openjdk:${java_image_tag}> build
# To build additional PySpark docker image
-./bin/docker-image-tool.sh -r <repo> -t my-tag -p
./kubernetes/dockerfiles/spark/bindings/python/Dockerfile build
+./bin/docker-image-tool.sh -r <repo> -t <tag> -p
./kubernetes/dockerfiles/spark/bindings/python/Dockerfile build
# To build additional SparkR docker image
-./bin/docker-image-tool.sh -r <repo> -t my-tag -R
./kubernetes/dockerfiles/spark/bindings/R/Dockerfile build
+./bin/docker-image-tool.sh -r <repo> -t <tag> -R
./kubernetes/dockerfiles/spark/bindings/R/Dockerfile build
```
### Test Cluster
@@ -85,14 +86,14 @@ When running shell, you can use cmd `kubectl describe pod
<podName>` to check if
### ServiceAccount
-When use Client mode to submit application, spark driver use the kubeconfig to
access api-service to create and watch executor pods.
+When use client mode to submit application, Spark driver uses the
[kubeconfig](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/)
to access Kubernetes API server to create and watch executor pods.
-When use Cluster mode to submit application, spark driver pod use
serviceAccount to access api-service to create and watch executor pods.
+When use cluster mode to submit application, Spark driver pod uses
[ServiceAccount](https://kubernetes.io/docs/concepts/security/service-accounts/)
to access Kubernetes API server to create and watch executor pods.
-In both cases, you need to figure out whether you have the permissions under
the corresponding namespace. You can use following cmd to create serviceAccount
(You need to have the kubeconfig which have the create serviceAccount
permission).
+In both cases, you need to figure out whether you have the permissions under
the corresponding namespace. You can use following commands to create
ServiceAccount.
```shell
-# create serviceAccount
+# create ServiceAccount
kubectl create serviceaccount spark -n <namespace>
# binding role
kubectl create clusterrolebinding spark-role --clusterrole=edit
--serviceaccount=<namespace>:spark --namespace=<namespace>
@@ -108,7 +109,7 @@ As it known to us all, Kubernetes can use configurations to
mount volumes into d
* persistentVolumeClaim: mounts a PersistentVolume into a pod.
Note: Please
-see [the Security section of this
document](https://spark.apache.org/docs/latest/running-on-kubernetes.html#security)
for security issues related to volume mounts.
+see [the Security
section](https://spark.apache.org/docs/latest/running-on-kubernetes.html#security)
for security issues related to volume mounts.
```
spark.kubernetes.driver.volumes.<type>.<name>.options.path=<dist_path>
@@ -124,7 +125,7 @@ Read [Using Kubernetes
Volumes](https://spark.apache.org/docs/latest/running-on-
Kubernetes allows defining pods from template files. Spark users can similarly
use template files to define the driver or executor pod configurations that
Spark configurations do not support.
-To do so, specify the spark properties
`spark.kubernetes.driver.podTemplateFile` and
`spark.kubernetes.executor.podTemplateFile` to point to local files accessible
to the spark-submit process.
+To do so, specify the Spark properties
`spark.kubernetes.driver.podTemplateFile` and
`spark.kubernetes.executor.podTemplateFile` to point to local files accessible
to the `spark-submit` process.
### Other
diff --git a/docs/deployment/kyuubi_on_kubernetes.md
b/docs/deployment/kyuubi_on_kubernetes.md
index 11ffe8e48..f016a8bb0 100644
--- a/docs/deployment/kyuubi_on_kubernetes.md
+++ b/docs/deployment/kyuubi_on_kubernetes.md
@@ -19,7 +19,7 @@
## Requirements
-If you want to deploy Kyuubi on Kubernetes, you'd better get a sense of the
following things.
+To deploy Kyuubi on Kubernetes, you'd better have cognition upon the following
things.
* Use Kyuubi official docker image or build Kyuubi docker image
* An active Kubernetes cluster
@@ -29,7 +29,7 @@ If you want to deploy Kyuubi on Kubernetes, you'd better get
a sense of the foll
## Kyuubi Official Docker Image
-You can find the official docker image at [Apache Kyuubi Docker
Hub](https://registry.hub.docker.com/r/apache/kyuubi).
+You can find the official docker image at [Docker Hub -
apache/kyuubi](https://registry.hub.docker.com/r/apache/kyuubi).
## Build Kyuubi Docker Image
@@ -38,22 +38,22 @@ You can build custom Docker images from the
`${KYUUBI_HOME}/bin/docker-image-too
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 image with tag "v1.8.1" to docker.io/myrepo
+ $0 -r docker.io/myrepo -t v1.8.1 build
+ $0 -r docker.io/myrepo -t v1.8.1 push
- - Build and push with tag "v1.4.0" and Spark-3.2.1 as base image to
docker.io/myrepo
- $0 -r docker.io/myrepo -t v1.4.0 -b BASE_IMAGE=repo/spark:3.2.1 build
- $0 -r docker.io/myrepo -t v1.4.0 push
+ - Build and push with tag "v1.8.1" and Spark-3.5.1 as base image to
docker.io/myrepo
+ $0 -r docker.io/myrepo -t v1.8.1 -b BASE_IMAGE=repo/spark:3.5.1 build
+ $0 -r docker.io/myrepo -t v1.8.1 push
- Build and push for multiple archs to docker.io/myrepo
- $0 -r docker.io/myrepo -t v1.4.0 -X build
+ $0 -r docker.io/myrepo -t v1.8.1 -X build
- Build with Spark placed "/path/spark"
$0 -s /path/spark build
- - Build with Spark Image myrepo/spark:3.1.0
- $0 -S /opt/spark -b BASE_IMAGE=myrepo/spark:3.1.0 build
+ - Build with Spark Image myrepo/spark:3.4.2
+ $0 -S /opt/spark -b BASE_IMAGE=myrepo/spark:3.4.2 build
```
`${KYUUBI_HOME}/bin/docker-image-tool.sh` use `Kyuubi Version` as default
docker tag and always build `${repo}/kyuubi:${tag}` image.
@@ -66,23 +66,18 @@ You can use `${KYUUBI_HOME}/bin/docker-image-tool.sh -h`
for more parameters.
## 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.
+It's recommended to [use Helm Chart to run Kyuubi on
Kubernetes](../quick_start/quick_start_with_helm.md).
### [Optional] ServiceAccount
-According to [Kubernetes
RBAC](https://kubernetes.io/docs/reference/access-authn-authz/rbac/), we need
to give kyuubi server the corresponding kubernetes privileges for
`created/list/delete` engine pods in kubernetes.
+According to [Kubernetes
RBAC](https://kubernetes.io/docs/reference/access-authn-authz/rbac/), you need
to grant to Kyuubi server the corresponding kubernetes privileges for
`created/list/delete` engine pods in Kubernetes.
-You should create your serviceAccount ( or reuse account with the appropriate
privileges ) and set your serviceAccountName for kyuubi pod, which you can find
template in `${KYUUBI_HOME}/docker/kyuubi-deployment.yaml` or
`${KYUUBI_HOME}/docker/kyuubi-pod.yaml`.
+You should create your ServiceAccount(or reuse account with the appropriate
privileges) and set your ServiceAccountName for Kyuubi pod, which you can find
template in `${KYUUBI_HOME}/docker/kyuubi-deployment.yaml` or
`${KYUUBI_HOME}/docker/kyuubi-pod.yaml`.
-For example, you can create serviceAccount by following command:
+For example, you can create ServiceAccount by following command:
```shell
kubectl create serviceAccount kyuubi -n <your namespace>
-
kubectl create rolebinding kyuubi-role --role=edit --serviceAccount=<your
namespace>:kyuubi --namespace=<your namespace>
```
@@ -92,11 +87,11 @@ See more related details in [Using RBAC
Authorization](https://kubernetes.io/doc
You can configure Kyuubi the old-fashioned way by placing
`kyuubi-defaults.conf` inside the image. Kyuubi does not recommend using this
way on Kubernetes.
-Kyuubi provide `${KYUUBI_HOME}/docker/kyuubi-configmap.yaml` to build
Configmap for Kyuubi.
+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)
+If you want to know Kyuubi engine on Kubernetes configurations, you can refer
to [Deploy Kyuubi engines on Kubernetes](engine_on_kubernetes.md)
## Connect
@@ -105,13 +100,13 @@ You should connect like:
```shell
kubectl exec -it kyuubi-example -- /bin/bash
-${KYUUBI_HOME}/bin/beeline -u 'jdbc:hive2://localhost:10009'
+${KYUUBI_HOME}/bin/beeline -u 'jdbc:kyuubi://localhost:10009'
```
Or you can submit tasks directly through local beeline:
```shell
-${KYUUBI_HOME}/bin/beeline -u 'jdbc:hive2://${hostname}:${port}'
+${KYUUBI_HOME}/bin/beeline -u 'jdbc:kyuubi://${hostname}:${port}'
```
As using service nodePort, port means nodePort and hostname means any hostname
of kubernetes node.
diff --git a/docs/quick_start/quick_start.rst b/docs/quick_start/quick_start.rst
index c95919e33..905996f7b 100644
--- a/docs/quick_start/quick_start.rst
+++ b/docs/quick_start/quick_start.rst
@@ -91,23 +91,26 @@ To install Kyuubi, you need to unpack the tarball. For
example,
โโโ RELEASE
โโโ beeline-jars
โโโ bin
+ โโโ charts
+ โ โโโ kyuubi
โโโ conf
| โโโ kyuubi-defaults.conf.template
โ โโโ kyuubi-env.sh.template
- โ โโโ log4j2.properties.template
+ โ โโโ log4j2.xml.template
+ โโโ db-scripts
+ โ โโโ mysql
+ โ โโโ postgresql
+ โ โโโ sqlite
โโโ docker
โ โโโ Dockerfile
- โ โโโ helm
- โ โโโ kyuubi-configmap.yaml
- โ โโโ kyuubi-deployment.yaml
- โ โโโ kyuubi-pod.yaml
- โ โโโ kyuubi-service.yaml
+ โ โโโ playground
โโโ externals
โ โโโ engines
โโโ jars
โโโ licenses
โโโ logs
โโโ pid
+ โโโ web-ui
โโโ work
From top to bottom are:
@@ -143,7 +146,7 @@ To install Spark, you need to unpack the tarball. For
example,
.. code-block::
- $ tar zxf spark-3.3.2-bin-hadoop3.tgz
+ $ tar zxf spark-3.4.2-bin-hadoop3.tgz
Configuration
~~~~~~~~~~~~~
diff --git a/docs/quick_start/quick_start_with_helm.md
b/docs/quick_start/quick_start_with_helm.md
index 0733a4de7..49f93b7d9 100644
--- a/docs/quick_start/quick_start_with_helm.md
+++ b/docs/quick_start/quick_start_with_helm.md
@@ -37,7 +37,7 @@ It will print release info with notes, including the ways to
get Kyuubi accessed
```shell
NAME: kyuubi
-LAST DEPLOYED: Sat Feb 11 20:59:00 2023
+LAST DEPLOYED: Fri Feb 23 13:15:10 UTC 2024
NAMESPACE: kyuubi
STATUS: deployed
REVISION: 1
@@ -53,12 +53,12 @@ In order to check the release status, use:
************************
******* Services *******
************************
+REST:
+- To access kyuubi-rest service within the cluster, use the following URL:
+ kyuubi-rest.kyuubi.svc.cluster.local
THRIFT_BINARY:
- To access kyuubi-thrift-binary service within the cluster, use the following
URL:
kyuubi-thrift-binary.kyuubi.svc.cluster.local
-- To access kyuubi-thrift-binary service from outside the cluster for
debugging, run the following command:
- kubectl port-forward svc/kyuubi-thrift-binary 10009:10009 -n kyuubi
- and use 127.0.0.1:10009
```
#### Uninstall the chart
@@ -107,14 +107,14 @@ kubectl get pod -n kyuubi
Find Kyuubi pods:
```shell
-NAME READY STATUS RESTARTS AGE
-kyuubi-5b6d496c98-kbhws 1/1 Running 0 38m
-kyuubi-5b6d496c98-lqldk 1/1 Running 0 38m
+NAME READY STATUS RESTARTS AGE
+kyuubi-0 1/1 Running 0 38m
+kyuubi-1 1/1 Running 0 38m
```
-Then, use pod name to get logs:
+Then, use pod name to retrieve logs:
```shell
-kubectl logs kyuubi-5b6d496c98-kbhws -n kyuubi
+kubectl logs kyuubi-0 -n kyuubi
```