k8s minikube部署hbase
                                                            生活随笔
收集整理的這篇文章主要介紹了
                                k8s minikube部署hbase
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.                        
                                一 yaml
k8s和minikube的暴露服務是不同的
k8s 用 Nodeport
minikube 用 LoadBalancer + minikube tunnel
二 minikube
1 hbase.yaml
--- apiVersion: v1 kind: Service metadata:name: hbase-cluster spec:type: LoadBalancerselector:app: hbaseports:-name: port-2181protocol: TCPport: 2181targetPort: 2181-name: port-8080protocol: TCPport: 8080targetPort: 8080-name: port-8085protocol: TCPport: 8085targetPort: 8085-name: port-9000protocol: TCPport: 9000targetPort: 9000-name: port-9090protocol: TCPport: 9090targetPort: 9090-name: port-16000protocol: TCPport: 16000targetPort: 16000-name: port-16010protocol: TCPport: 16010targetPort: 16010-name: port-16020protocol: TCPport: 16020targetPort: 16020-name: port-16201protocol: TCPport: 16201targetPort: 16201-name: port-16301protocol: TCPport: 16301targetPort: 16301--- apiVersion: v1 kind: Pod metadata:name: hbase01labels:app: hbase spec:containers:-name: hbaseimage: harisekhon/hbase:1.4imagePullPolicy: IfNotPresentports:-name: port-2181protocol: TCPcontainerPort: 2181-name: port-8080protocol: TCPcontainerPort: 8080-name: port-8085protocol: TCPcontainerPort: 8085-name: port-9000protocol: TCPcontainerPort: 9000-name: port-9090protocol: TCPcontainerPort: 9090-name: port-9095protocol: TCPcontainerPort: 9095-name: port-16000protocol: TCPcontainerPort: 16000-name: port-16010protocol: TCPcontainerPort: 16010-name: port-16020protocol: TCPcontainerPort: 16020-name: port-16201protocol: TCPcontainerPort: 16201-name: port-16301protocol: TCPcontainerPort: 16301這里的pod.matedata.name 要寫入本地
/etc/hosts 127.0.0.1 hbase012 scala 連接測試
https://www.yuque.com/tiankonghewo/note/kum53k
3 建表
docker exec -it hbase bash hbase shell create 'student', 'cf' put 'student','wsy','cf:height','180' put 'student','wsy','cf:birthday','19900303' put 'student','lucy','cf:height','165' put 'student','lucy','cf:birthday','19921001' desc 'student' get 'student','wsy' get 'student','lucy' exitscan 'ns1:t1',{COLUMNS=>['c1','c2'],LIMIT=>10,STARTROW=>'xyz'}scan 'default:student',{COLUMNS=>['bizid'],LIMIT=>10}參考鏈接:
https://www.yuque.com/tiankonghewo/note/edi557
與50位技術專家面對面20年技術見證,附贈技術全景圖總結
以上是生活随笔為你收集整理的k8s minikube部署hbase的全部內容,希望文章能夠幫你解決所遇到的問題。
 
                            
                        - 上一篇: postgresql常用数据类型:数值、
- 下一篇: 在现有k8s集群中安装kubespher
