制作镜像
docker pull ghcr.io/googlecloudplatform/spark-operator:v1beta2-1.3.8-3.1.1
docker images
docker save ImageID > ./spark.tar
将制作的镜像上传到目的机器中,加载镜像
docker load < ./spark.tar
打标签其中xxxx.xxx/xx/为私有仓库的地址
docker tag imgaeID xxxx.xxx/xx/spark-operator:v1beta2-1.3.8-3.1.1
将制作好的镜像推到私有仓库中
docker push xxxx.xxx/xx/spark-operator:v1beta2-1.3.8-3.1.1
下载spark-operator和部署
Github地址:
https://github.com/GoogleCloudPlatform/spark-on-k8s-operator/releases/download/spark-operator-chart-1.1.27/spark-operator-1.1.27.tgz
下载上传到机器中
解压spark-operator-1.1.27.tgz,修改values.yaml内容,修改副本数量为3、镜像源、利用伪亲和性使得三个副本在三台机器上。
修改Chart.yaml文件
打包压缩:
tar -zcvf spark.tgz spark-operator
使用helm部署spark
helm install 名称 ./spark.tgz -n 命名空间
升级
helm upgrade 名称 ./spark.tgz -f spark-operator/values.yaml -n 命名空间
卸载文章来源:https://www.toymoban.com/news/detail-707778.html
helm uninstall 名称 -n 命名空间
查看部署情况文章来源地址https://www.toymoban.com/news/detail-707778.html
kubectl get pods -n 命名空间 | grep 名称
到了这里,关于使用k8s helm离线部署spark-operator(私有仓库)的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!