您好,登录后才能下订单哦!
密码登录
登录注册
点击 登录注册 即表示同意《亿速云用户服务条款》
小编给大家分享一下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进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。