首页 > 其他分享 >kubekey 快速构建重构测试k8s 环境 allinone单机 or cluster 集群

kubekey 快速构建重构测试k8s 环境 allinone单机 or cluster 集群

时间:2024-10-09 09:23:22浏览次数:8  
标签:false replicas kubekey enabled cluster volumeSize allinone true resources

export KKZONE=cn
curl -sfL https://get-kk.kubesphere.io | VERSION=v3.0.13 sh -
生成配置k8s集群yml
指定k8s 版本及管理面板
 ./kk create config --with-kubernetes v1.23.10 --with-kubesphere v3.4.1
apiVersion: kubekey.kubesphere.io/v1alpha2
kind: Cluster
metadata:
  name: sample
spec:
  hosts:
  - {name: k8s-aio, address: 192.168.18.70, internalAddress: 192.168.18.70, user: root, password: "root"}
  roleGroups:
    etcd:
    - k8s-aio
    control-plane: 
    - k8s-aio
    worker:
    - k8s-aio
  controlPlaneEndpoint:
    ## Internal loadbalancer for apiservers 
    # internalLoadbalancer: haproxy

    domain: lb.kubesphere.local
    address: ""
    port: 6443
  kubernetes:
    version: v1.23.10
    clusterName: cluster.local
    autoRenewCerts: true
    containerManager: docker
  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: ""
    namespaceOverride: ""
    registryMirrors: []
    insecureRegistries: []
  addons: []



---
apiVersion: installer.kubesphere.io/v1alpha1
kind: ClusterConfiguration
metadata:
  name: ks-installer
  namespace: kubesphere-system
  labels:
    version: v3.4.1
spec:
  persistence:
    storageClass: ""
  authentication:
    jwtSecret: ""
  local_registry: ""
  # dev_tag: ""
  etcd:
    monitoring: false
    endpointIps: localhost
    port: 2379
    tlsEnable: true
  common:
    core:
      console:
        enableMultiLogin: true
        port: 30880
        type: NodePort
    # apiserver:
    #  resources: {}
    # controllerManager:
    #  resources: {}
    redis:
      enabled: false
      enableHA: false
      volumeSize: 2Gi
    openldap:
      enabled: false
      volumeSize: 2Gi
    minio:
      volumeSize: 20Gi
    monitoring:
      # type: external
      endpoint: http://prometheus-operated.kubesphere-monitoring-system.svc:9090
      GPUMonitoring:
        enabled: false
    gpu:
      kinds:
      - resourceName: "nvidia.com/gpu"
        resourceType: "GPU"
        default: true
    es:
      # master:
      #   volumeSize: 4Gi
      #   replicas: 1
      #   resources: {}
      # data:
      #   volumeSize: 20Gi
      #   replicas: 1
      #   resources: {}
      enabled: false
      logMaxAge: 7
      elkPrefix: logstash
      basicAuth:
        enabled: false
        username: ""
        password: ""
      externalElasticsearchHost: ""
      externalElasticsearchPort: ""
    opensearch:
      # master:
      #   volumeSize: 4Gi
      #   replicas: 1
      #   resources: {}
      # data:
      #   volumeSize: 20Gi
      #   replicas: 1
      #   resources: {}
      enabled: true
      logMaxAge: 7
      opensearchPrefix: whizard
      basicAuth:
        enabled: true
        username: "admin"
        password: "admin"
      externalOpensearchHost: ""
      externalOpensearchPort: ""
      dashboard:
        enabled: false
  alerting:
    enabled: false
    # thanosruler:
    #   replicas: 1
    #   resources: {}
  auditing:
    enabled: false
    # operator:
    #   resources: {}
    # webhook:
    #   resources: {}
  devops:
    enabled: false
    jenkinsCpuReq: 0.5
    jenkinsCpuLim: 1
    jenkinsMemoryReq: 4Gi
    jenkinsMemoryLim: 4Gi
    jenkinsVolumeSize: 16Gi
  events:
    enabled: false
    # operator:
    #   resources: {}
    # exporter:
    #   resources: {}
    ruler:
      enabled: true
      replicas: 2
    #   resources: {}
  logging:
    enabled: false
    logsidecar:
      enabled: true
      replicas: 2
      # resources: {}
  metrics_server:
    enabled: false
  monitoring:
    storageClass: ""
    node_exporter:
      port: 9100
      # resources: {}
    # kube_rbac_proxy:
    #   resources: {}
    # kube_state_metrics:
    #   resources: {}
    # prometheus:
    #   replicas: 1
    #   volumeSize: 20Gi
    #   resources: {}
    #   operator:
    #     resources: {}
    # alertmanager:
    #   replicas: 1
    #   resources: {}
    # notification_manager:
    #   resources: {}
    #   operator:
    #     resources: {}
    #   proxy:
    #     resources: {}
    gpu:
      nvidia_dcgm_exporter:
        enabled: false
        # resources: {}
  multicluster:
    clusterRole: none
  network:
    networkpolicy:
      enabled: false
    ippool:
      type: none
    topology:
      type: none
  openpitrix:
    store:
      enabled: false
  servicemesh:
    enabled: false
    istio:
      components:
        ingressGateways:
        - name: istio-ingressgateway
          enabled: false
        cni:
          enabled: false
  edgeruntime:
    enabled: false
    kubeedge:
      enabled: false
      cloudCore:
        cloudHub:
          advertiseAddress:
            - ""
        service:
          cloudhubNodePort: "30000"
          cloudhubQuicNodePort: "30001"
          cloudhubHttpsNodePort: "30002"
          cloudstreamNodePort: "30003"
          tunnelNodePort: "30004"
        # resources: {}
        # hostNetWork: false
      iptables-manager:
        enabled: true
        mode: "external"
        # resources: {}
      # edgeService:
      #   resources: {}
  gatekeeper:
    enabled: false
    # controller_manager:
    #   resources: {}
    # audit:
    #   resources: {}
  terminal:
    timeout: 600
kk create cluster -yf config-cluster-example.yaml

 

标签:false,replicas,kubekey,enabled,cluster,volumeSize,allinone,true,resources
From: https://www.cnblogs.com/ruiy/p/18453527

相关文章

  • R语言中gene symbol 转换为ENTREZID, clusterprofile富集分析
    001、genes<-read.table("genes.txt")##读取基因symbolhead(genes)tail(genes)genes<-genes[genes!="NA_NA"&genes!="unknow",,drop=FALSE]##去除无效信息(可选)genes_list<-unique(ge......
  • k8s架构,从clusterIP到光电半导体,再从clusterIP到企业管理
    clusterIP作为k8s中的服务,也是其他三个服务的基础~]$kubectlcreateserviceclusteripexternalnameloadbalancernodeport客户端的流量到serviceservice分发给pod,pod由控制器自动部署,自动维护那么问题是service的可用性如何保证?这里以clusterip这个服务举例......
  • Validation Failed: 1: this action would add [2] shards, but this cluster current
    在最近部署的一个项目中,是使用elk来记录应用系统日志的,突然发现,近几天的日志在kibana上面没有显示。于是去排查elk的日志,发现logstash中有这样一条警告信息"ValidationFailed:1:thisactionwouldadd[2]shards,butthisclustercurrentlyhas[999]/[1000]maximumn......
  • 日新月异 PyTorch - pytorch 基础: K-means 聚类算法(sklearn.cluster 的 KMeans 实现,
    源码https://github.com/webabcd/PytorchDemo作者webabcd日新月异PyTorch-pytorch基础:K-means聚类算法(sklearn.cluster的KMeans实现,对一个包含10个特征的数据做分类)示例如下:basic\demo07.py'''K-means聚类算法(sklearn.cluster的KMeans实现,对一个包含1......
  • 科研绘图系列:R语言树结构聚类热图(cluster heatmap)
    文章目录介绍加载R包导入数据数据预处理画图修改图形导出数据系统信息介绍热图结合树结构展示聚类结果通常用于展示数据集中的模式和关系,这种图形被称为聚类热图或层次聚类热图。在这种图中,热图部分显示了数据矩阵的颜色编码值,而树结构(通常称为树状图......
  • GBase 8a MPP Cluster 数据库产品的巡检
    GBase8aMPPCluster产品的巡检一般包含以下几个方面工作:1、检查数据库的接入情况2、检查数据库状态3、检查Core文件或dump文件4、检查系统情况(1)查看数据库连接巡检的第一步就是要验证数据库是否可访问。数据库可访问代表数据库客户端和服务端的网络端口和服务正常。......
  • 宝藏级Docker应用推荐(建议NAS/AllinOne用户收藏)
    梳理收集了个人比较常用的Docker应用,这些应用大多免费开源,能极大提高的提高日常工作效率,也能充分榨干家里闲置设备资源,比如NAS、个人PC、主机服务器等。一、家庭娱乐中心类家庭影音、漫画、小说等1、影视类Jellyfin、Emby(个人可以不开通专业版,免费版够用)推荐原因:看电影......
  • Mysql Non cluster combined fields select where order by field different time co
    usemydb;droptableifexistst1;createtablet1(idintauto_incrementprimarykey,firstnamevarchar(100)notnulldefault'',lastnamevarchar(100)notnulldefault'',indexfn_ln_index(firstname,lastname)); FLUSHBINARYLO......
  • 【开源dcluster】一站式数据服务分析平台IDEA本地开发指南
    源码Gitee地址:https://gitee.com/zhenglv123456/dcluster在线文档:http://47.121.127.33:8090/在线体验:http://36.155.14.171:12345/dolphinscheduler/ui/login账号密码:test/test123  源码启动1.前端启动 进入dolphinscheduler-ui目录,执行以下命令 npmins......
  • 【开源dcluster】Seatunnel数据同步之MySQL同步到doris
    源码Gitee地址:https://gitee.com/zhenglv123456/dcluster在线文档:https://47.121.127.33:8090/在线体验:http://36.155.14.171:12345/dolphinscheduler/ui/login账号密码:test/test123 创建同步任务操作步骤:1.点击创建任务 2.配置同步脚本 3.设置同步时间......