ZBLOG

k3s 搭建harbor配置文件

以下是一个示例k3s搭建Harbor的配置文件:

# k3s-server-harbor.yaml

# k3s server config
write-kubeconfig-mode: 0644
tls-san:
  - "my-k3s-server.example.com"
  - "my-k3s-harbor.example.com"

# Harbor setup
kubelet-arg: 
  cloud-provider: external
  feature-gates: CSINodeInfo=true,CSIDriverRegistry=true,VolumeSnapshotDataSource=true
node-taint: 
  # Ensure that the harbor node runs only the harbor components
  "node-role.kubernetes.io/not-ready": "true:NoSchedule"
  "node-role.kubernetes.io/harbor": "true:NoSchedule"
extra_binds:
  # Bind /data to a persistent volume for Harbor data storage
  - "/mnt/data/harbor:/data"
# Harbor-specific environment variables
env: 
  - name: SECRET_KEY
    value: "mysecretpassword"
  - name: ROOT_PASSWORD
    value: "mypassword"
  - name: HARBOR_ADMIN_PASSWORD
    value: "myadminpassword"

# Ingress configuration for Harbor
ingress-nginx:
  enabled: true
  options:
    --set controller.publishService.enabled=false
    --set controller.metrics.enabled=true
    --set-string ssl-passthrough.enabled=true
    --set-string ssl-passthrough.hostname=my-k3s-harbor.example.com
harbor:
  enabled: true
  image: harbor/harbor:v2.3.0
  expose: 
    type: ingress
    tls: 
      hosts: 
        - my-k3s-harbor.example.com
      secretName: harbor-tls-secret
  database:
    password: mydbpassword
  redis:
    password: myredispassword

上述配置文件中,我们指定了k3s server的TLS证书信息和Harbor的相关配置,包括kubelet参数,taint节点标记,数据挂载点,环境变量以及Ingress和Harbor的相关设置。可以根据实际需要进行更改。

本站部分文章来源于网络,版权归原作者所有,如有侵权请联系站长删除。
转载请注明出处:https://golang.0voice.com/?id=1915

分享:
扫描分享到社交APP
上一篇
下一篇
发表列表
游客 游客
此处应有掌声~
评论列表

还没有评论,快来说点什么吧~

联系我们

在线咨询: 点击这里给我发消息

微信号:3007537140

上班时间: 10:30-22:30

关注我们
x

注册

已经有帐号?