公告

特别推出京东优惠挖掘小程序 [点击这里,扫码收藏] 专门收集京东今日特价爆品,商家漏洞等,拼手速,手慢无! 新增优惠: 1,美团外卖红包:扫码至少节省3元[点击收藏],全国可用,用完还能领。 2,车主加油打折服务:一键导航到加油站,选择油枪,支付时直减。 [点击查看] 3,电影票购买返利,覆盖所有主流院线。 [点击查看]

#1 2022-12-02 00:11:21

小天天
Moderator
注册时间: 2019-09-29
帖子: 835

kubekey for kubernet

----配置---
[root@master1 op]# cat config.yaml
apiVersion: kubekey.kubesphere.io/v1alpha2
kind: Cluster
metadata:
  name: sample
spec:
  hosts:
  - {name: master1, address:192.159.63.82, internalAddress: 192.159.63.82, privateKeyPath: "/root/kk-install/ssh/id_rsa"}
  - {name: master2, address:192.159.63.83, internalAddress: 192.159.63.83, privateKeyPath: "/root/kk-install/ssh/id_rsa"}
  - {name: master3, address:192.159.63.84, internalAddress: 192.159.63.84, privateKeyPath: "/root/kk-install/ssh/id_rsa"}
  - {name: work1, address:192.159.63.85, internalAddress: 192.159.63.85, privateKeyPath: "/root/kk-install/ssh/id_rsa"}
  - {name: work2, address:192.159.63.86, internalAddress: 192.159.63.86, privateKeyPath: "/root/kk-install/ssh/id_rsa"}
  - {name: work3, address:192.159.63.87, internalAddress: 192.159.63.87, privateKeyPath: "/root/kk-install/ssh/id_rsa"}
  - {name: work4, address:192.159.63.88, internalAddress: 192.159.63.88, privateKeyPath: "/root/kk-install/ssh/id_rsa"}
  - {name: work5, address:192.159.63.89, internalAddress: 192.159.63.89, privateKeyPath: "/root/kk-install/ssh/id_rsa"}
  - {name: work6, address:192.159.63.90, internalAddress: 192.159.63.90, privateKeyPath: "/root/kk-install/ssh/id_rsa"}
  - {name: work7, address:192.159.63.91, internalAddress: 192.159.63.91, privateKeyPath: "/root/kk-install/ssh/id_rsa"}
  - {name: work8, address:192.159.63.92, internalAddress: 192.159.63.92, privateKeyPath: "/root/kk-install/ssh/id_rsa"}
  roleGroups:
    etcd:
    - master[1:3]
    master:
    - master[1:3]
    worker:
    - work[1:8]
  controlPlaneEndpoint:
    ##Internal loadbalancer for apiservers
    internalLoadbalancer: haproxy
    domain: lb.kubesphere.local
    address: ""
    port: 6443
  kubernetes:
    version: v1.25.4
    clusterName: cluster.local
    autoRenewCerts: true
    containerManager: containerd
  etcd:
    type: kubekey
  network:
    plugin: calico
    kubePodsCIDR: 10.233.64.0/18
    kubeServiceCIDR: 10.233.0.0/18
    ## multus support. https://github.com/k8snetworkplumbingwg/multus-cni
    multusCNI:
      enabled: false
  registry:
    privateRegistry: "reg.xxxtoon.com"
    namespaceOverride: "k8s"   ###  harbor项目路径 reg.xxxtoon.com/k8s
    registryMirrors: []
    insecureRegistries: []
  addons: []

2),创建kubernets
./kk create cluster --with-kubernetes v1.25.4 -f config.yaml

离线

页脚

Powered by 华新企财帮

京ICP备19031397号-1