ubuntu18.04部署k8s系列 01-配置虚拟机

1.先安装好master主机(不导入ssh)

2.配置网络ip以及主机名称

# 配置ip地址
# sudo vim /etc/netplan/50-cloud-init.yaml
network:
    ethernets:
        enp0s3:
            addresses: []
            dhcp4: true
        enp0s8:
            addresses:
            - 192.168.56.101/24
            dhcp4: false
        enp0s9:
            addresses: []
            dhcp4: true
    version: 2
# 修改主机名称
# sudo vim /etc/hosts
127.0.0.1	localhost.localdomain	localhost k8s-master
::1		localhost6.localdomain6	localhost6 k8s-master6

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

127.0.0.1    localhost
192.168.56.101   k8s-master
192.168.56.102   k8s-node-1
192.168.56.103   k8s-node-2
192.168.56.104   k8s-node-3

3.创建分机

ubuntu18.04部署k8s系列 01-配置虚拟机_第1张图片

ubuntu18.04部署k8s系列 01-配置虚拟机_第2张图片

你可能感兴趣的:(ubuntu部署k8s)