K8S集群的搭建:环境准备及相关命令
生活随笔
收集整理的這篇文章主要介紹了
K8S集群的搭建:环境准备及相关命令
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
四種途徑
環(huán)境準(zhǔn)備
1. 設(shè)置主機(jī)名與時(shí)區(qū) timedatectl set-timezone Asia/Shanghai #都要執(zhí)行 hostnamectl set-hostname master #132執(zhí)行 hostnamectl set-hostname node1 #133執(zhí)行 hostnamectl set-hostname node2 #137執(zhí)行 2. 添加hosts網(wǎng)絡(luò)主機(jī)配置,三臺(tái)虛擬機(jī)都要設(shè)置 vim /etc/hosts 192.168.163.132 master 192.168.163.133 node1 192.168.163.137 node2 3. 關(guān)閉防火墻,三臺(tái)虛擬機(jī)都要設(shè)置,生產(chǎn)環(huán)境跳過(guò)這一步(這四行代碼一定不要在生產(chǎn)環(huán)境執(zhí)行) sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config setenforce 0 systemctl disable firewalld systemctl stop firewalld總結(jié)
以上是生活随笔為你收集整理的K8S集群的搭建:环境准备及相关命令的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: mongodb 实现点赞功能
- 下一篇: K8S集群搭建:安装kubeadm集群部