您好,登錄后才能下訂單哦!
小編給大家分享一下sealyun如何安裝k8s,相信大部分人都還不怎么了解,因此分享這篇文章給大家參考一下,希望大家閱讀完這篇文章后大有收獲,下面讓我們一起去了解一下吧!
https://sealyun.com/
使用腳本:
#!/bin/bash yum remove -y docker \ docker-client \ docker-client-latest \ docker-common \ docker-latest \ docker-latest-logrotate \ docker-logrotate \ docker-selinux \ docker-engine-selinux \ docker-engine # update yum -y update # 設置 yum repository yum install -y yum-utils \ device-mapper-persistent-data \ bash-completion \ lvm2 yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo # 安裝并啟動 docker #yum install -y docker-ce-18.09.7 docker-ce-cli-18.09.7 containerd.io yum install -y docker-ce-19.03.8 docker-ce-cli-19.03.8 containerd.io systemctl enable docker systemctl start docker # 安裝 nfs-utils # 必須先安裝 nfs-utils 才能掛載 nfs 網絡存儲 yum install -y nfs-utils yum install -y wget # 關閉 防火墻 systemctl stop firewalld systemctl disable firewalld # 關閉 SeLinux setenforce 0 sed -i "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config # 關閉 swap swapoff -a yes | cp /etc/fstab /etc/fstab_bak cat /etc/fstab_bak |grep -v swap > /etc/fstab # 修改 /etc/sysctl.conf # 如果有配置,則修改 sed -i "s#^net.ipv4.ip_forward.*#net.ipv4.ip_forward=1#g" /etc/sysctl.conf sed -i "s#^net.bridge.bridge-nf-call-ip6tables.*#net.bridge.bridge-nf-call-ip6tables=1#g" /etc/sysctl.conf sed -i "s#^net.bridge.bridge-nf-call-iptables.*#net.bridge.bridge-nf-call-iptables=1#g" /etc/sysctl.conf # 可能沒有,追加 echo "net.ipv4.ip_forward = 1" >> /etc/sysctl.conf echo "net.bridge.bridge-nf-call-ip6tables = 1" >> /etc/sysctl.conf echo "net.bridge.bridge-nf-call-iptables = 1" >> /etc/sysctl.conf # 執行命令以應用 sysctl -p systemctl daemon-reload systemctl restart docker wget -c https://sealyun.oss-cn-beijing.aliyuncs.com/latest/sealos && \ chmod +x sealos mv sealos /usr/bin
wget -c https://sealyun.oss-cn-beijing.aliyuncs.com/7b6af025d4884fdd5cd51a674994359c-1.18.0/kube1.18.0.tar.gz
ip地址按實際情況修改,主機要求 2核心 2G內存 或以上
sealos init --passwd 123456 \ --master 192.168.0.2 --master 192.168.0.3 --master 192.168.0.4 \ --node 192.168.0.5 \ --pkg-url /root/kube1.18.0.tar.gz \ --version v1.18.0
sealos join --master 192.168.0.6 --master 192.168.0.7
wget https://github.com/sealstore/dashboard/releases/download/v1.0-1/kuboard.tar sealos install --pkg-url kuboard.tar # 查看密碼 kubectl get secret -nkube-system \ $(kubectl get secret -n kube-system|grep kuboard-user-token |awk '{print $1}') \ -o jsonpath='{.data.token}' | base64 --decode # 端口32567,用http
wget https://github.com/sealstore/dashboard/releases/download/v2.0.0-bata5/dashboard.tar sealos install --pkg-url dashboard.tar # 查看密碼 kubectl get secret -nkubernetes-dashboard \ $(kubectl get secret -n kubernetes-dashboard|grep dashboard-token |awk '{print $1}') \ -o jsonpath='{.data.token}' | base64 --decode # 端口32000,用https
以上是“sealyun如何安裝k8s”這篇文章的所有內容,感謝各位的閱讀!相信大家都有了一定的了解,希望分享的內容對大家有所幫助,如果還想學習更多知識,歡迎關注億速云行業資訊頻道!
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。