资源文件里面包含有kubenetes安装时所需要的包和镜像文件(网络插件),先下载资源解压
部署Harbor
安装docker
yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
dnf makecache fast
[root@harbor ~]
[root@harbor ~]
创建https证书
[root@harbor ~]
[root@harbor ~]
[root@harbor harbor]
[root@harbor harbor]
[root@harbor harbor]
[root@harbor harbor]
-key tls/cert.key -out tls/cert.crt \
-subj "/C=CN/ST=BJ/L=BJ/O=Tedu/OU=NSD/CN=harbor"
创建并启动项目
[root@harbor harbor]
[root@harbor harbor]
05: hostname: harbor
08:
10:
17: certificate: /usr/local/harbor/tls/cert.crt
18: private_key: /usr/local/harbor/tls/cert.key
34: harbor_admin_password: admin123
[root@harbor harbor]
[root@harbor harbor]
[root@harbor harbor]
[root@harbor harbor]
查看验证项目
[root@harbor harbor]
NAME STATUS CONFIG FILES
harbor running(9) /usr/local/harbor/docker-compose.yml
[root@harbor harbor]
NAME COMMAND SERVICE STATUS
harbor-core "/harbor/entrypoint.…" core running (healthy)
harbor-db "/docker-entrypoint.…" postgresql running (healthy)
harbor-jobservice "/harbor/entrypoint.…" jobservice running (healthy)
harbor-log "/bin/sh -c /usr/loc…" log running (healthy)
harbor-portal "nginx -g 'daemon of…" portal running (healthy)
nginx "nginx -g 'daemon of…" proxy running (healthy)
redis "redis-server /etc/r…" redis running (healthy)
registry "/home/harbor/entryp…" registry running (healthy)
registryctl "/home/harbor/start.…" registryctl running (healthy)
登录私有仓库
[root@docker ~]
192.168.88.30 harbor
[root@docker ~]
{
"registry-mirrors": ["https://harbor:443"],
"insecure-registries":["harbor:443"]
}
[root@docker ~]
[root@docker ~]
Username: luck
Password: ********
... ...
Login Succeeded
[root@docker ~]
{
"auths": {
"harbor:443": {
"auth": "bHVjazoqKioqKioqKg=="
}
}
}
配置软件仓库
[root@harbor s4]
[root@harbor s4]
[root@harbor s4]