k8s hue+hdfs+hive实验环境部署 您所在的位置:网站首页 k8s部署hbase k8s hue+hdfs+hive实验环境部署

k8s hue+hdfs+hive实验环境部署

2023-11-21 07:20| 来源: 网络整理| 查看: 265

预先安装好了vagrant+virtualbox+docker+minikube(minik8s),并修改了本地hostk8s为vagrant配置的虚拟机的ip

开启minikube

先去阿里弄一下镜像加速地址链接,获取类似https://xxx.mirror.aliyuncs.com的加速地址

#minikube start --registry-mirror=https://xxx.mirror.aliyuncs.com #开启minikube minikube start --registry-mirror=http://hub-mirror.c.163.com --cpus=4 --memory=4096mb -p test #启动一个4G内存使用163docker加速的test minikube容器 minikube profile test#切换管理test容器 nohup minikube dashboard 1>>dashboard.log 2>>dashboard.err & #后台运行仪表盘 nohup kubectl proxy --port=80 --address='0.0.0.0' --accept-hosts='^.*' > /dev/null 2>&1 & #后台运行代理映射到外网

访问 http://k8s/api/v1/namespaces/kubernetes-dashboard/services/http:kubernetes-dashboard:/proxy/#/overview?namespace=default 注意k8s域名改成你自己的ip或者域名 在这里插入图片描述

安装helm

下载最新版目前是3.4.1github|csdn,可以wget,因为我本地有我直接放在vagrant共享目录里,然后一套连招

mv /vagrant/helm-v3.4.1-linux-amd64.tar.gz ./ && tar -zxvf helm-v3.4.1-linux-amd64.tar.gz && sudo mv linux-amd64/helm /usr/local/bin/helm && chmod +x /usr/local/bin/helm && sudo ln -s /usr/local/bin/helm /usr/bin/helm && rm -rf helm-v3.4.1-linux-amd64.tar.gz linux-amd64/ helm

helm doc

分别启动方式 安装hue helm repo add gethue https://helm.gethue.com helm repo update helm install gethue/hue --generate-name kubectl port-forward svc/hue 8888:8888 --address 0.0.0.0 & #开放访问

等待部署完成,部署情况可以进minikube仪表盘的pods项查看 访问http://k8s:8888/ 在这里插入图片描述

HDFS helm repo add gradiant https://gradiant.github.io/charts/ helm install hdfs --set dataNode.replicas=1 gradiant/hdfs #单数据节点 kubectl port-forward -n default hdfs-namenode-0 50070:50070 --address 0.0.0.0

hue直连hdfs需要增加配置(property是在configuration项包裹里) [core-site.xml] hdfs namenode允许启动httpfs的linux用户访问

hadoop.proxyuser.hdfs.hosts* hadoop.proxyuser.hdfs.groups*

[hdfs-site.xml]关闭文件权限控制,天下大同

dfs.permissions.enabledfalse

[httpfs-site.xml]允许httpfs使用hue用户访问(hue默认使用hue用户并doas admin使用admin用户的马甲,并且需要注意与core-site.xml不同的是属性的开头是httpfs不是Hadoop)

httpfs.proxyuser.hue.hosts* httpfs.proxyuser.hue.groups* HIVE helm repo add gradiant https://gradiant.github.io/charts/ helm inspect values gradiant/hive #查看可配置值 helm install hive --set metastore.enabled=false --set hdfs.dataNode.replicas=1 gradiant/hive #不使用元数据和hdfs数据节点只用一个节点 kubectl port-forward -n default svc/hive-server 10000:10000 --address 0.0.0.0

在这里插入图片描述

自制chart #创建图表 helm create hivedev #进入项目 cd hivedev #追加依赖 cat Chart.yaml dependencies: - name: hue version: 1.0.0 repository: https://helm.gethue.com/ - name: hive version: 0.1.5 repository: https://gradiant.github.io/charts EOF #更新依赖 helm dependency update #设置默认值 cat


【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有