時間:2020-08-21來源:www.farandoo.com作者:電腦系統城
[root@k8s-master ~]# echo "export KUBECONFIG=/etc/kubernetes/admin.conf" >> /etc/profile
[root@k8s-master ~]# source /etc/profile
[root@k8s-master ~]# echo $KUBECONFIG
[root@k8s-master bridge]# sysctl net.bridge.bridge-nf-call-iptables=1
kubectl apply -f kube-flannel.yaml
kube-flannel.yam
下載地址:https://github.com/hansonwang99/JavaCollection/edit/master/docs/kubernetes/kube-flannel.yaml
kubectl get pods --all-namespaces -o wide
/opt/elasticsearch
目錄中
[root@k8s-master ~]# mkdir /opt/elasticsearch
[root@k8s-master ~]# cd /opt/elasticsearch/
[root@k8s-master elasticsearch]# tar -zxvf elasticsearch-6.4.2.tar.1.gz
[root@k8s-node-1 elasticsearch]# cd elasticsearch-6.4.2//config
[root@k8s-master config]# vim elasticsearch.yml
cluster.name:ruigege #集群名稱
node.name:ruigege1 #節點名
network.host:192.168.1.9 #綁定的節點1地址
network.bind_host:0.0.0.0 #不設置這個,本機可能不能訪問
discovery.zen.ping.unicast.hosts:["192.168.1.9","192.168.1.8"] #hosts列表
discovery.zen.minimum_master_nodes:1
#如下配置是為了解決Elasticsearch可視化工具dejavu的跨域問題,若不使用可視化工具那么就可忽略
http.port: 9200
http.cors.allow-origin:"http://192.168.199.76:1358"
http.cors.enabled:true
http.cors.allow-headers: X-Requested-With,X-Auth-Token,Content-Type,Content-Leng
th,Authorization
http.cors.allow-credentials:true
[root@k8s-node-1 config]# groupadd es
[root@k8s-node-1 config]# useradd es -g es
[root@k8s-node-1 config]# cd ..
[root@k8s-node-1 elasticsearch-6.4.2]# cd ..
[root@k8s-node-1 elasticsearch]# chown -R es:es ./elasticsearch-6.4.2
[root@k8s-node-1 elasticsearch]# systemctl stop firewalld
[root@k8s-node-1 elasticsearch]# systemctl disable firewalld
[root@k8s-node-1 elasticsearch]# su es
[es@k8s-node-1 elasticsearch]$ cd elasticsearch-6.4.2/bin
[es@k8s-node-1 bin]$ ./elasticsearch
2022-04-13
蘋果系統安裝雙系統圖文教程 蘋果系統怎么裝雙系統 ?2022-04-13
遠程登錄Linux CentOS系統方法 怎么遠程登錄Linux CentOS系統?2022-03-21
CentOS7安裝MYSQL8.X的詳解教程很多網友對于linux系統比較陌生,更別說linux系統安裝了。有使用筆記本電腦的網友需要用到linux系統,不過卻不知道怎么安裝,所以下面小編要來跟大家說說linux操作系統安裝步驟詳細,大家一起來看看吧。...
2022-03-07
RedFlag紅旗Linux系統怎么安裝?電腦想要安裝雙系統,該怎么安裝RedFlag紅旗系統呢?下面我們就來看看紅旗Red Flag安裝全程圖解,詳細請看下文介紹...
2022-01-23