root@k8s-master-61:~# apt -y install apt-transport-https ca-certificates curl software-properties-common Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: libcurl4 python3-software-properties The following NEW packages will be installed: apt-transport-https The following packages will be upgraded: ca-certificates curl libcurl4 python3-software-properties software-properties-common 5 upgraded, 1 newly installed, 0 to remove and 244 not upgraded. Need to get 574 kB of archives. After this operation, 138 kB of additional disk space will be used. Get:1 http://mirrors.aliyun.com/ubuntu focal-security/main amd64 ca-certificates all 20211016ubuntu0.20.04.1 [141 kB] Get:2 http://mirrors.aliyun.com/ubuntu focal-updates/universe amd64 apt-transport-https all 2.0.9 [1,704 B] Get:3 http://mirrors.aliyun.com/ubuntu focal-security/main amd64 curl amd64 7.68.0-1ubuntu2.14 [161 kB] Get:4 http://mirrors.aliyun.com/ubuntu focal-security/main amd64 libcurl4 amd64 7.68.0-1ubuntu2.14 [235 kB] Get:5 http://mirrors.aliyun.com/ubuntu focal-updates/main amd64 software-properties-common all 0.99.9.8 [10.6 kB] Get:6 http://mirrors.aliyun.com/ubuntu focal-updates/main amd64 python3-software-properties all 0.99.9.8 [24.9 kB] Fetched 574 kB in 1s (465 kB/s) Preconfiguring packages ... (Reading database ... 71222 files and directories currently installed.) Preparing to unpack .../0-ca-certificates_20211016ubuntu0.20.04.1_all.deb ... Unpacking ca-certificates (20211016ubuntu0.20.04.1) over (20201027ubuntu0.20.04.1) ... Selecting previously unselected package apt-transport-https. Preparing to unpack .../1-apt-transport-https_2.0.9_all.deb ... Unpacking apt-transport-https (2.0.9) ... Preparing to unpack .../2-curl_7.68.0-1ubuntu2.14_amd64.deb ... Unpacking curl (7.68.0-1ubuntu2.14) over (7.68.0-1ubuntu2.4) ... Preparing to unpack .../3-libcurl4_7.68.0-1ubuntu2.14_amd64.deb ... Unpacking libcurl4:amd64 (7.68.0-1ubuntu2.14) over (7.68.0-1ubuntu2.4) ... Preparing to unpack .../4-software-properties-common_0.99.9.8_all.deb ... Unpacking software-properties-common (0.99.9.8) over (0.98.9.3) ... Preparing to unpack .../5-python3-software-properties_0.99.9.8_all.deb ... Unpacking python3-software-properties (0.99.9.8) over (0.98.9.3) ... Setting up apt-transport-https (2.0.9) ... Setting up ca-certificates (20211016ubuntu0.20.04.1) ... Updating certificates in /etc/ssl/certs... rehash: warning: skipping ca-certificates.crt,it does not contain exactly one certificate or CRL 8 added, 22 removed; done. Setting up python3-software-properties (0.99.9.8) ... Setting up libcurl4:amd64 (7.68.0-1ubuntu2.14) ... Setting up curl (7.68.0-1ubuntu2.14) ... Setting up software-properties-common (0.99.9.8) ... Processing triggers for libc-bin (2.31-0ubuntu9.2) ... Processing triggers for man-db (2.9.1-1) ... Processing triggers for dbus (1.12.16-2ubuntu2.1) ... Processing triggers for ca-certificates (20211016ubuntu0.20.04.1) ... Updating certificates in /etc/ssl/certs... 0 added, 0 removed; done. Running hooks in /etc/ca-certificates/update.d... done.
三、安装验证证书
3.1 安装gpg证书
这里采用的是华为云镜像站的源,之前测过 阿里云和清华源的话 安装速度不太理想
1 2
root@k8s-master-61:~# curl -fsSL http:///repo.huaweicloud.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add - OK