三台物理机Ubuntu 18.04 配置k8s 集群

本文档详细介绍了如何在三台Ubuntu 18.04物理机上配置k8s集群,包括设置节点IP、准备环境、master节点初始化(解决国内无法访问k8s.grc.io问题,使用阿里云镜像仓库)、节点添加及验证过程。
摘要由CSDN通过智能技术生成

1、三台物理机ip

ip name
192.168.0.106 master
192.168.0.132 node1
192.168.0.146 node2

2、所有节点进行如下准备

#分别更改hostname
hostnamectl set-hostname master

#添加域名解析
cat <<EOF >>/etc/hosts
192.168.0.106 master
192.168.0.132 node1
192168.0.146 node2
EOF

#关闭swap 
swapoff -a

#配置国内apt源, 以下为阿里源,将 /etc/apt/sources.list 中内容替换如下
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值