k8s集群部署之harbor仓库
在10.4.7.200 上执行mkdir -p /opt/srccd /opt/src上传包rztar zxvf harbor-offline-installer-v1.8.3.tgz -C /opt/mv harbor/ harbor-v1.8.3cd harborvi harbor.yml5 hostname: harbor.od.com10port: 18027 harbor_admin_p
在10.4.7.200 上执行
mkdir -p /opt/src
cd /opt/src
上传包
rz
tar zxvf harbor-offline-installer-v1.8.3.tgz -C /opt/
mv harbor/ harbor-v1.8.3
cd harbor
vi harbor.yml
5 hostname: harbor.od.com
10 port: 180
27 harbor_admin_password: Harbor12345
40 data_volume: /data/harbor
87 location: /data/harbor/logs # 更改日志存储路径
mkdir -p /data/harbor/logs
单机编排工具
yum install -y docker-compose
安装
./install.sh
docker-compose ps
docker-compose up -d
yum install -y nginx
vim /etc/nginx/conf.d/harbor.od.com.conf
server {
listen 80;
server_name harbor.od.com;
client_max_body_size 1000m;
location / {
proxy_pass http://127.0.0.1:180;
}
}
nginx -t
systemctl start nginx
systemctl enable nginx
在10.4.7.11上执行
vim /var/named/od.com.zone
添加
harbor A 10.4.7.200
dig -t A harbor.od.com @10.4.7.11 +short
在10.4.7.200上执行
此部分为docker配置代理 如没代理请跳过
mkdir -p /etc/systemd/system/docker.service.d
vim /etc/systemd/system/docker.service.d/http-proxy.conf
[Service]
Environment="HTTP_PROXY=x.x.x.x:8080" "NO_PROXY=localhost,127.0.0.1,harbor.od.com"
systemctl show --property=Environment docker
docker pull nginx:1.7.9
docker images |grep nginx
docker tag 84581e99d807 harbor.od.com/public/nginx:v1.7.9
docker images |grep nginx
docker login harbor.od.com
docker push harbor.od.com/public/nginx:v1.7.9
更多推荐
所有评论(0)