ubuntu20.04 安装k8s

该博客详细介绍了如何在Ubuntu 20.04上安装Kubernetes,包括设置sudo无密码、安装Docker、通过kubeadm安装k8s、初始化集群、加入节点、安装cilium和calico CNI插件,以及解决k8s安装过程中遇到的问题,如k8s与containerd的兼容性问题。
摘要由CSDN通过智能技术生成

更改网络配置

vi /etc/netplan/00-installer-config.yaml

network:
  ethernets:
    enp0s3:
      dhcp4: true
    enp0s8:
      dhcp4: no
      addresses:
        - 192.168.107.128/24
  version: 2
netplan apply

Set no password for sudo

%sudo ALL=(ALL:ALL) NOPASSWD:ALL

SSH to your virtual machine. and follow below instructure.

If you are not using Macbook, prepare a Linux OS and follow below instructure.

Install kubernetes by kubeadm

https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/

Installing runtime

https://docs.docker.com/engine/install/ubuntu/

Update the apt package index and install packages to allow apt to use a repository over HTTPS:

$ sudo apt-get update
$ sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg-agent 
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值