使用 Helm 安装 harbor

前提准备,(1)已经安装 Helm ,参考 Helm 安装 ,(2)集群有默认的动态存储可用,参数 使用StorageClass提供PV动态存储

1. 使用 Helm 安装 Ingress

Ingress 由 Ingress 和 Ingress Controller 两部分组成。在 Kubernetes 中,Ingress 对象描述路由规则;Ingress Controller 通过与 Apiserver 交互,将 Ingress 规则写入 Nginx Pod 中。Helm 2 使用:

相关推荐

站点声明:本站部分内容转载自网络,作品版权归原作者及来源网站所有,任何内容转载、商业用途等均须联系原作者并注明来源。

相关侵权、举报、投诉及建议等,请发邮件至E-mail:service@mryunwei.com

回到顶部
1
helm install --name nginx-ingress --set "rbac.create=true,controller.service.externalIPs[0]=192.168.10.2" stable/nginx-ingress
helm install nginx-ingress --set "rbac.create=true,controller.service.externalIPs[0]=192.168.10.2" stable/nginx-ingress
kubectl get svc 
NAME                            TYPE           CLUSTER-IP      EXTERNAL-IP    PORT(S)                      AGE
nginx-ingress-controller        LoadBalancer   10.109.17.54    192.168.10.2   80:31006/TCP,443:31184/TCP   30m
nginx-ingress-default-backend   ClusterIP      10.106.94.214   <none>         80/TCP                       30m
git clone https://github.com/goharbor/harbor-helm.git
git checkout 1.1.0
git diff
--- a/values.yaml
+++ b/values.yaml
@@ -25,8 +25,8 @@ expose:
     commonName: ""
   ingress:
     hosts:
-      core: core.harbor.domain
-      notary: notary.harbor.domain
+      core: core.harbor.chenshaowen.com
+      notary: notary.harbor.chenshaowen.com
     1. set to the type of ingress controller if it has specific requirements.
     1. leave as `default` for most ingress controllers.
     1. set to `gce` if using the GCE ingress controller
@@ -95,7 +95,7 @@ expose:
 1. the IP address of k8s node 
 1. 
 1. If Harbor is deployed behind the proxy, set it as the URL of proxy
-externalURL: https://core.harbor.domain
+externalURL: https://core.harbor.chenshaowen.com
kubectl get ingress -n harbor  
NAME                    HOSTS                                     ADDRESS   PORTS     AGE
harbor-harbor-ingress   core.harbor.domain,notary.harbor.domain             80, 443   7m15s
docker login core.harbor.chenshaowen.com
Username: admin
Password:
Error response from daemon: Get https://core.harbor.chenshaowen.com/v2/: x509: certificate signed by unknown authority
kubectl get secrets/harbor-harbor-ingress -n harbor -o jsonpath="{.data.ca.crt}" | base64 --decode
docker tag sonarqube:7.1 core.harbor.chenshaowen.com/library/snoarque:7.1
docker push core.harbor.chenshaowen.com/library/snoarque:7.1
The push refers to repository [core.harbor.chenshaowen.com/library/snoarque]
195b3d541b37: Pushed
8fb1d730c37c: Pushing [=============>                                     ]  48.57MB/177.1MB
1e09c232b1a9: Pushed