K8S cluster with multi-masters on Azure VM

拓扑参考:

在这里插入图片描述

在 Azure VM 实例上部署 KubeSphere

  • 基础模板
    需要修改 IP 地址和 VM Image的可以在模板中修改。

    {"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#","contentVersion": "1.0.0.0","parameters": {"vmNamePrefix": {"defaultValue": "master-","type": "String","metadata": {"description": "The name of your VM master node."}},"vmssName": {"defaultValue": "node","type": "String","metadata": {"description": "The name of your VMSS cluster."}},"location": {"defaultValue": "[resourceGroup().location]","type": "String","metadata": {"description": "Location for all resources."}},"adminUsername": {"type": "String","metadata": {"description": "Username for the Virtual Machine."}},"adminKey": {"type": "SecureString","metadata": {"description": "SSH Key for the Virtual Machine."}},"defaultMasterCount": {"defaultValue": 3,"type": "Int","metadata": {"description": "The default instances count of master"}},"defaultNodeCount": {"defaultValue": 3,"type": "Int","metadata": {"description": "The initial node size of your VMSS cluster."}},"minNodeCount": {"defaultValue": 1,"type": "Int","metadata": {"description": "The min node size of your VMSS cluster."}},"maxNodeCount": {"defaultValue": 20,"type": "Int","metadata": {"description": "The max node size of your VMSS cluster."}},"dnsLabelPrefix": {"defaultValue": "[toLower(concat('k8s-cluster-', uniqueString(resourceGroup().id)))]","type": "String","metadata": {"description": "Unique DNS Name for the Public IP used to access the Virtual Machine."}},"vmSize": {"defaultValue": "Standard_DS2_v2","type": "String","metadata": {"description": "The size of the VM"}},"virtualNetworkName": {"defaultValue": "vNetwork","type": "String","metadata": {"description": "Name of the Virtual Network"}},"subnetName": {"defaultValue": "Subnet","type": "String","metadata": {"description": "Name of the subnet in the virtual network"}},"vmssSubnetName": {"defaultValue": "nodeSubnet","type": "String","metadata": {"description": "Name of the VMSS subnet in the virtual network"}},"publicLBName": {"defaultValue": "publicLB","type": "String","metadata": {"description": "Internal Load Balancer name"}}},"variables": {"publicIPAddressName": "[concat(parameters('publicLBName'), 'IP' )]","availabilitySetName": "masterAvSet","networkInterfaceName": "[concat(parameters('vmNamePrefix'),'Interface')]","networkSecurityGroupName": "[concat(parameters('virtualNetworkName'),'nsg-default')]","subnetRef": "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), parameters('subnetName'))]","vmssSubnetRef": "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), parameters('vmssSubnetName'))]","osDiskType": "Standard_LRS","publicLBID": "[resourceId('Microsoft.Network/loadBalancers',parameters('publicLBName'))]"},"resources": [{"type": "Microsoft.Network/networkSecurityGroups","apiVersion": "2015-06-15","name": "[variables('networkSecurityGroupName')]","location": "[parameters('location')]","properties": {"securityRules": [{"name": "Port_SSH","properties": {"description": "SSH","protocol": "*","sourcePortRange": "*","destinationPortRange": "22","sourceAddressPrefix": "*","destinationAddressPrefix": "*","access": "Allow","priority": 100,"direction": "Inbound","sourcePortRanges": [],"destinationPortRanges": [],"sourceAddressPrefixes": [],"destinationAddressPrefixes": []}},{"name": "Port_API_Server","properties": {"description": "k8s API Server","protocol": "TCP","sourcePortRange": "*","destinationPortRange": "6443","sourceAddressPrefix": "*","destinationAddressPrefix": "*","access": "Allow","priority": 140,"direction": "Inbound","sourcePortRanges": [],"destinationPortRanges": [],"sourceAddressPrefixes": [],"destinationAddressPrefixes": []}},{"name": "Port_Http","properties": {"description": "Web","protocol": "TCP","sourcePortRange": "*","destinationPortRange": "80","sourceAddressPrefix": "*","destinationAddressPrefix": "*","access": "Allow","priority": 120,"direction": "Inbound","sourcePortRanges": [],"destinationPortRanges": [],"sourceAddressPrefixes": [],"destinationAddressPrefixes": []}},{"name": "Port_Https","properties": {"protocol": "TCP","sourcePortRange": "*","destinationPortRange": "443","sourceAddressPrefix": "*","destinationAddressPrefix": "*","access": "Allow","priority": 130,"direction": "Inbound","sourcePortRanges": [],"destinationPortRanges": [],"sourceAddressPrefixes": [],"destinationAddressPrefixes": []}}]}},{"type": "Microsoft.Network/virtualNetworks","apiVersion": "2019-11-01","name": "[parameters('virtualNetworkName')]","location": "[parameters('location')]","dependsOn": ["[resourceId('Microsoft.Network/networkSecurityGroups/', variables('networkSecurityGroupName'))]"],"properties": {"addressSpace": {"addressPrefixes": ["10.211.0.0/16"]},"subnets": [{"name": "[parameters('vmssSubnetName')]","properties": {"networkSecurityGroup": {"id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]"},"addressPrefix": "10.211.0.0/24"}},{"name": "[parameters('subnetName')]","properties": {"networkSecurityGroup": {"id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]"},"addressPrefix": "10.211.1.0/24"}}]}},{"type": "Microsoft.Network/networkInterfaces","apiVersion": "2019-11-01","name": "[concat(variables('networkInterfaceName'), copyindex())]","location": "[parameters('location')]","dependsOn": ["[resourceId('Microsoft.Network/virtualNetworks/', parameters('virtualNetworkName'))]","[resourceId('Microsoft.Network/loadBalancers/', parameters('publicLBName'))]"],"properties": {"ipConfigurations": [{"name": "ipconfig1","properties": {"subnet": {"id": "[variables('subnetRef')]"},"loadBalancerBackendAddressPools": [{"id": "[concat(variables('publicLBID'), '/backendAddressPools/BackendPoolMaster')]"}],"loadBalancerInboundNatRules": [{"id": "[concat(variables('publicLBID'), '/inboundNatRules/lbNAT-master',copyindex())]"}],"privateIPAllocationMethod": "Dynamic"}}]},"copy": {"name": "nicLoop","count": "[parameters('defaultMasterCount')]"}},{"type": "Microsoft.Network/publicIPAddresses","apiVersion": "2019-09-01","name": "[variables('publicIPAddressName')]","location": "[parameters('location')]","sku": {"name": "Standard"},"properties": {"publicIPAllocationMethod": "Static","publicIPAddressVersion": "IPv4","dnsSettings": {"domainNameLabel": "[parameters('dnsLabelPrefix')]"},"idleTimeoutInMinutes": 10}},{"type": "Microsoft.Network/loadBalancers","apiVersion": "2018-06-01","name": "[parameters('publicLBName')]","location": "[parameters('location')]","dependsOn": ["[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]"],"sku": {"name": "Standard"},"properties": {"frontendIPConfigurations": [{"name": "LoadBalancerFrontEnd","properties": {"publicIPAddress": {"id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]"}}}],"backendAddressPools": [{"name": "BackendPoolNode"},{"name": "BackendPoolMaster"}],"loadBalancingRules": [{"name": "HttpLBRule","properties": {"frontendIPConfiguration": {"id": "[concat(variables('publicLBID'),'/frontendIPConfigurations/LoadBalancerFrontEnd')]"},"backendAddressPool": {"id": "[concat(variables('publicLBID'),'/backendAddressPools/BackendPoolNode')]"},"protocol": "Tcp","frontendPort": 80,"backendPort": 80,"enableFloatingIP": false,"disableOutboundSnat": false,"idleTimeoutInMinutes": 5,"probe": {"id": "[concat(variables('publicLBID'),'/probes/tcpProbe')]"}}},{"name": "APILBRule","properties": {"frontendIPConfiguration": {"id": "[concat(variables('publicLBID'),'/frontendIPConfigurations/LoadBalancerFrontEnd')]"},"backendAddressPool": {"id": "[concat(variables('publicLBID'),'/backendAddressPools/BackendPoolMaster')]"},"protocol": "Tcp","frontendPort": 6443,"backendPort": 6443,"enableFloatingIP": false,"disableOutboundSnat": false,"idleTimeoutInMinutes": 5,"probe": {"id": "[concat(variables('publicLBID'),'/probes/apitcpProbe')]"}}}],"probes": [{"name": "tcpProbe","properties": {"protocol": "Tcp","port": 80,"intervalInSeconds": 5,"numberOfProbes": 2}},{"name": "apitcpProbe","properties": {"protocol": "Tcp","port": 6443,"intervalInSeconds": 5,"numberOfProbes": 2}}],"inboundNatRules": [{"name": "lbNAT-master0","properties": {"frontendIPConfiguration": {"id": "[concat(variables('publicLBID'),'/frontendIPConfigurations/LoadBalancerFrontEnd')]"},"protocol": "Tcp","frontendPort": "50200","backendPort": "22"}},{"name": "lbNAT-master1","properties": {"frontendIPConfiguration": {"id": "[concat(variables('publicLBID'),'/frontendIPConfigurations/LoadBalancerFrontEnd')]"},"protocol": "Tcp","frontendPort": "50201","backendPort": "22"}},{"name": "lbNAT-master2","properties": {"frontendIPConfiguration": {"id": "[concat(variables('publicLBID'),'/frontendIPConfigurations/LoadBalancerFrontEnd')]"},"protocol": "Tcp","frontendPort": "50202","backendPort": "22"}}],"inboundNatPools": [{"name": "lbNAT-node","properties": {"frontendIPConfiguration": {"id": "[concat(variables('publicLBID'),'/frontendIPConfigurations/LoadBalancerFrontEnd')]"},"protocol": "Tcp","frontendPortRangeStart": 50100,"frontendPortRangeEnd": 50199,"backendPort": 22}}]}},{"type": "Microsoft.Compute/availabilitySets","apiVersion": "2016-04-30-preview","name": "[variables('availabilitySetName')]","location": "[parameters('location')]","properties": {"platformFaultDomainCount": 2,"platformUpdateDomainCount": 2,"managed": true}},{"type": "Microsoft.Compute/virtualMachines","apiVersion": "2019-07-01","name": "[concat(parameters('vmNamePrefix'), copyindex())]","location": "[parameters('location')]","dependsOn": ["[concat('Microsoft.Network/networkInterfaces/', variables('networkInterfaceName'), copyindex())]","[concat('Microsoft.Compute/availabilitySets/', variables('availabilitySetName'))]","[concat('Microsoft.Compute/virtualMachineScaleSets/', parameters('vmssName'))]"],"properties": {"availabilitySet": {"id": "[resourceId('Microsoft.Compute/availabilitySets',variables('availabilitySetName'))]"},"hardwareProfile": {"vmSize": "[parameters('vmSize')]"},"storageProfile": {"osDisk": {"createOption": "FromImage","managedDisk": {"storageAccountType": "[variables('osDiskType')]"}},"imageReference": {"publisher": "Canonical","offer": "0001-com-ubuntu-server-focal","sku": "20_04-lts-gen2","version": "latest"}},"networkProfile": {"networkInterfaces": [{"id": "[resourceId('Microsoft.Network/networkInterfaces',concat(variables('networkInterfaceName'),copyindex()))]"}]},"osProfile": {"computerName": "[concat(parameters('vmNamePrefix'), copyindex())]","adminUsername": "[parameters('adminUsername')]","adminPassword": "[parameters('adminKey')]","linuxConfiguration": {"disablePasswordAuthentication": true,"ssh": {"publicKeys": [{"path": "[concat('/home/', parameters('adminUsername'), '/.ssh/authorized_keys')]","keyData": "[parameters('adminKey')]"}]}}}},"copy": {"name": "virtualMachineLoop","count": "[parameters('defaultMasterCount')]"}},{"type": "Microsoft.Compute/virtualMachineScaleSets","apiVersion": "2019-07-01","name": "[parameters('vmssName')]","location": "[parameters('location')]","dependsOn": ["[concat('Microsoft.Network/virtualNetworks/', parameters('virtualNetworkName'))]","[concat('Microsoft.Network/loadBalancers/', parameters('publicLBName'))]"],"tags": {"cluster-autoscaler-enabled": "true","cluster-autoscaler-name": "[resourceGroup().name]","min": "[parameters('minNodeCount')]","max": "[parameters('maxNodeCount')]","poolName": "[parameters('vmssName')]"},"sku": {"name": "[parameters('vmSize')]","tier": "Standard","capacity": "[parameters('defaultNodeCount')]"},"properties": {"overprovision": false,"upgradePolicy": {"mode": "Manual"},"virtualMachineProfile": {"storageProfile": {"osDisk": {"createOption": "FromImage","caching": "ReadWrite"},"imageReference": {"publisher": "Canonical","offer": "0001-com-ubuntu-server-focal","sku": "20_04-lts-gen2","version": "latest"}},"osProfile": {"computerNamePrefix": "[parameters('vmssName')]","adminUsername": "[parameters('adminUsername')]","adminPassword": "[parameters('adminKey')]","linuxConfiguration": {"disablePasswordAuthentication": true,"ssh": {"publicKeys": [{"path": "[concat('/home/', parameters('adminUsername'), '/.ssh/authorized_keys')]","keyData": "[parameters('adminKey')]"}]}}},"networkProfile": {"networkInterfaceConfigurations": [{"name": "[concat(parameters('vmssName'),'nic')]","properties": {"primary": true,"ipConfigurations": [{"name": "[concat('ipconfigVmss', parameters('vmssName'))]","properties": {"subnet": {"id": "[variables('vmssSubnetRef')]"},"loadBalancerBackendAddressPools": [{"id": "[concat(variables('publicLBID'), '/backendAddressPools/BackendPoolNode')]"}],"loadBalancerInboundNatPools": [{"id": "[concat(variables('publicLBID'), '/inboundNatPools/lbNAT-node')]"}]}}]}}]}}}}],"outputs": {"adminUsername": {"type": "String","value": "[parameters('adminUsername')]"},"hostname": {"type": "String","value": "[reference(variables('publicIPAddressName')).dnsSettings.fqdn]"},"sshCommand": {"type": "String","value": "[concat('ssh ', parameters('adminUsername'), '@', reference(variables('publicIPAddressName')).dnsSettings.fqdn)]"}}
    }
    
    • 可以修改 master 和 node 的名字前缀、部署区域、数量和 VM 类型

      在这里插入图片描述

      • ssh 22 对外由 LB 配置 NAT 端口实现,如配置文件中 50200 → master-0
        • 已经包含的规则转换(不含 30880)

          服务协议规则后端端口前端端口节点池
          sshTCP入站 NAT2250200, 50201, 50202, 50100~50199主节点, 普通节点
          api 服务器TCP负载均衡64436443主节点
          ks 控制台TCP负载均衡3088030880主节点
          httpTCP负载均衡8080普通节点
          httpsTCP负载均衡443443普通节点
      • node 使用 VMSS
  • 部署 K8S cluster
    最简单的方式还是用 kk 完成,注意在 kubernetes 1.24 以后,psp 弃用,在 kk 中还有 psp 权限管理,安装的时候会报错。建议使用 1.23.10,也是 kk 现在默认的版本。

    • 证书传输 → Master-0

      scp  -i zyi.pem -P 50200 zyi.pem zyi@20.247.0.170:/home/zyi/.ssh/
    • 每一台安装 socat 等必须的软件

      ssh -i zyi.pem -p50200 zyi@20.247.0.170 'sudo apt install socat conntrack'
      
    • 登录到 Mater-0

      ssh -i zyi.pem -p50200 zyi@20.247.0.170
      
    • 下载 kk 并赋予可执行权限

    curl -sfL https://get-kk.kubesphere.io | VERSION=v3.0.10 sh -chmod +x kk
    
    • 创建配置文件模板

      ./kk create config --with-kubesphere v3.3.2 --with-kubernetes v1.22.12
      
      • KubeSphere 3.3 对应 Kubernetes 版本推荐:v1.20.x、v1.21.x、* v1.22.x、* v1.23.x 和 * v1.24.x。带星号的版本可能出现边缘节点部分功能不可用的情况。因此,如需使用边缘节点,推荐安装 v1.21.x。如果未指定 Kubernetes 版本,KubeKey 将默认安装 Kubernetes v1.23.10。有关支持的 Kubernetes 版本请参阅支持矩阵。

      • 如果在此步骤中的命令中未添加标志 -with-kubesphere,则不会部署 KubeSphere,除非您使用配置文件中的 addons 字段进行安装,或稍后使用 ./kk create cluster 时再次添加此标志。

      • 如果在未指定 KubeSphere 版本的情况下添加标志 --with kubesphere`,将安装 KubeSphere 的最新版本。

      • 修改的内容用红色标注

        apiVersion: kubekey.kubesphere.io/v1alpha2
        kind: Cluster
        metadata:name: kubeCluster
        spec:hosts:- {name: master-0, address: 20.210.0.156, port: 50200, internalAddress: 10.211.1.5, user: zyi, privateKeyPath: "~/.ssh/zyi.pem"}- {name: master-1, address: 20.210.0.156, port: 50201, internalAddress: 10.211.1.6, user: zyi, privateKeyPath: "~/.ssh/zyi.pem"}- {name: master-2, address: 20.210.0.156, port: 50202, internalAddress: 10.211.1.4, user: zyi, privateKeyPath: "~/.ssh/zyi.pem"}- {name: node000000, address: 20.210.0.156, port: 50100, internalAddress: 10.211.0.4, user: zyi, privateKeyPath: "~/.ssh/zyi.pem"}- {name: node000001, address: 20.210.0.156, port: 50101, internalAddress: 10.211.0.5, user: zyi, privateKeyPath: "~/.ssh/zyi.pem"}- {name: node000002, address: 20.210.0.156, port: 50102, internalAddress: 10.211.0.6, user: zyi, privateKeyPath: "~/.ssh/zyi.pem"}roleGroups:etcd:- master-0- master-1- master-2control-plane:- master-0- master-1- master-2worker:- node000000- node000001- node000002controlPlaneEndpoint:## Internal loadbalancer for apiservers# internalLoadbalancer: haproxydomain: lb.etaon.labaddress: "20.210.0.156"port: 6443kubernetes:version: v1.23.10clusterName: cluster.localautoRenewCerts: truecontainerManager: dockeretcd:type: kubekeynetwork:plugin: flannelkubePodsCIDR: 10.233.64.0/18kubeServiceCIDR: 10.233.0.0/18## multus support. https://github.com/k8snetworkplumbingwg/multus-cnimultusCNI:enabled: falseregistry:privateRegistry: ""namespaceOverride: ""registryMirrors: []insecureRegistries: []addons: []---
        apiVersion: installer.kubesphere.io/v1alpha1
        kind: ClusterConfiguration
        metadata:name: ks-installernamespace: kubesphere-systemlabels:version: v3.3.2
        spec:persistence:storageClass: ""authentication:jwtSecret: ""zone: ""local_registry: ""namespace_override: ""# dev_tag: ""etcd:monitoring: falseendpointIps: localhostport: 2379tlsEnable: truecommon:core:console:enableMultiLogin: trueport: 30880type: NodePort# apiserver:#  resources: {}# controllerManager:#  resources: {}redis:enabled: falsevolumeSize: 2Giopenldap:enabled: falsevolumeSize: 2Giminio:volumeSize: 20Gimonitoring:# type: externalendpoint: http://prometheus-operated.kubesphere-monitoring-system.svc:9090GPUMonitoring:enabled: falsegpu:kinds:- resourceName: "nvidia.com/gpu"resourceType: "GPU"default: truees:# master:#   volumeSize: 4Gi#   replicas: 1#   resources: {}# data:#   volumeSize: 20Gi#   replicas: 1#   resources: {}logMaxAge: 7elkPrefix: logstashbasicAuth:enabled: falseusername: ""password: ""externalElasticsearchHost: ""externalElasticsearchPort: ""alerting:enabled: false# thanosruler:#   replicas: 1#   resources: {}auditing:enabled: false# operator:#   resources: {}# webhook:#   resources: {}devops:enabled: false# resources: {}jenkinsMemoryLim: 8GijenkinsMemoryReq: 4GijenkinsVolumeSize: 8Gievents:enabled: false# operator:#   resources: {}# exporter:#   resources: {}# ruler:#   enabled: true#   replicas: 2#   resources: {}logging:enabled: falselogsidecar:enabled: truereplicas: 2# resources: {}metrics_server:enabled: falsemonitoring: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: nonenetwork:networkpolicy:enabled: falseippool:type: nonetopology:type: noneopenpitrix:store:enabled: falseservicemesh:enabled: falseistio:components:ingressGateways:- name: istio-ingressgatewayenabled: falsecni:enabled: falseedgeruntime:enabled: falsekubeedge:enabled: falsecloudCore:cloudHub:advertiseAddress:- ""service:cloudhubNodePort: "30000"cloudhubQuicNodePort: "30001"cloudhubHttpsNodePort: "30002"cloudstreamNodePort: "30003"tunnelNodePort: "30004"# resources: {}# hostNetWork: falseiptables-manager:enabled: truemode: "external"# resources: {}# edgeService:#   resources: {}terminal:timeout: 600
        
    • 安装部署

      ./kk create cluster -f config-sample.yaml
      
      • 安装日志
      kubectl logs -n kubesphere-system $(kubectl get pod -n kubesphere-system -l 'app in (ks-install, ks-installer)' -o jsonpath='{.items[0].metadata.name}') -f
      
      #####################################################
      ###              Welcome to KubeSphere!           ###
      #####################################################Console: http://10.211.1.5:30880
      Account: admin
      Password: P@88w0rd
      NOTES:1. After you log into the console, please check themonitoring status of service components in"Cluster Management". If any service is notready, please wait patiently until all components are up and running.2. Please change the default password after login.#####################################################
      https://kubesphere.io             2023-08-11 03:31:56
      #####################################################
      
    • 在 LBer 上为 30880端口 配置规则并在 ASG 上 permit

      在这里插入图片描述

      在这里插入图片描述

    • http://hostip:30880

      在这里插入图片描述

  • 测试

    apiVersion: v1
    kind: Service
    metadata:name: hello-kubernetes
    spec:type: NodePortports:- port: 80targetPort: 8080selector:app: hello-kubernetes
    ---
    apiVersion: apps/v1
    kind: Deployment
    metadata:name: hello-kubernetes
    spec:replicas: 3selector:matchLabels:app: hello-kubernetestemplate:metadata:labels:app: hello-kubernetesspec:containers:- name: hello-kubernetesimage: paulbouwer/hello-kubernetes:1.5ports:- containerPort: 8080env:- name: MESSAGEvalue: I just deployed a PodVM on the Azure VM Cluster!!
    
    • 配置外部访问30596 → 80

      kubectl get svc
      NAME               TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)        AGE
      hello-kubernetes   NodePort    10.233.31.158   <none>        80:30596/TCP   167m
      
    • 负载均衡上配置

      在这里插入图片描述

    • 访问前端 公网 IP 或 DNS 名称

      在这里插入图片描述

      在这里插入图片描述

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/52576.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

达梦数据库分区表介绍

概述 本文将对达梦数据库分区表概念、创建、维护进行介绍。 1.分区表概念 1.1 分区表使用场景 近几年&#xff0c;随着移动支付快速发展&#xff0c;银行交易系统中【移动小微支付场景】使用越来越多&#xff0c;系统中流水账单表数据量巨大&#xff0c;往往上TB。 为了提高…

Embedding 向量生成GPT数据使用相关

如果使用python3.6的版本&#xff0c;使用pycharm创建工程&#xff0c;那么默认会使用 docx包&#xff0c;这样运行程序会爆异常&#xff0c;突然想起以前请教的一个大神&#xff0c;想当 初&#xff0c;这个问题困扰了我 两天时间&#xff0c;在此记录一下&#xff1a; pytho…

Linux上实现分片压缩及解压分片zip压缩包 - 及zip、unzip命令详解

&#x1f468;‍&#x1f393;博主简介 &#x1f3c5;云计算领域优质创作者   &#x1f3c5;华为云开发者社区专家博主   &#x1f3c5;阿里云开发者社区专家博主 &#x1f48a;交流社区&#xff1a;运维交流社区 欢迎大家的加入&#xff01; &#x1f40b; 希望大家多多支…

AI夏令营第三期 - 基于论文摘要的文本分类与关键词抽取挑战赛笔记

赛题&#xff1a;基于论文摘要的文本分类与关键词抽取 背景&#xff1a;高效的从海量医学文献中提取疾病诊断和治疗关键信息 任务&#xff1a;通过论文摘要判断论文是否为医学文献 样例 数据集&#xff1a;csv文件&#xff0c;字段&#xff1a;标题、作者、摘要、关键词 评价指…

Bootstrap的类container与类container-fluid有什么区别?

阅读本文前建议先阅读下面两篇博文&#xff1a; 怎么样通过Bootstrap已经编译好(压缩好)的源码去查看符合阅读习惯的源码【通过Source Map(源映射)文件实现】 在CSS中&#xff0c;盒模型中的padding、border、margin是什么意思&#xff1f; 以下是Bootstrap的类 container 的盒…

wireshark进行网络监听

一、实验目的&#xff1a; 1&#xff09;掌握使用CCProxy配置代理服务器&#xff1b; 2&#xff09;掌握使用wireshark抓取数据包&#xff1b; 3&#xff09;能够对数据包进行简单的分析。 二、预备知识&#xff1a; 包括监听模式、代理服务器、中间人攻击等知识点&#xf…

ElementUI中的日历组件加载无效的问题

在ElementUI中提供了一个日历组件。在某些场景下还是比较有用的。只是在使用的时候会有些下坑&#xff0c;大家要注意下。   官网提供的信息比较简介。我们在引入到项目中使用的时候可以能会出现下面的错误提示。 Unknown custom element: <el-calendar> - did you …

MySQL下载安装配置

天行健&#xff0c;君子以自强不息&#xff1b;地势坤&#xff0c;君子以厚德载物。 每个人都有惰性&#xff0c;但不断学习是好好生活的根本&#xff0c;共勉&#xff01; 文章均为学习整理笔记&#xff0c;分享记录为主&#xff0c;如有错误请指正&#xff0c;共同学习进步。…

Java百度提前批面试题

今天分享百度提前批的 Java 后端开发面经&#xff0c;整体上考察的点挺多的&#xff0c;主要重点考察了网络i/o、网络协议、linux系统、mysql&#xff0c;Java 问的不多&#xff0c;可能是百度的后端开发的语言不是主要以 Java 为主&#xff0c;所以重点看面试者的计算机基础是…

8个月打磨,打造出的全能工具箱,让你事半功倍!

这款工具叫即时工具&#xff0c;目前有网页端和客户端可以下载至本地离线使用&#xff0c;区别在于客户端采用原生适配性能更好&#xff0c;网页端需要上传至服务器或浏览器内部处理。 体验地址&#xff1a;点击直达 一、为什么会开发这个工具 综合性和多功能性&#xff1a;…

深入理解线性回归模型的评估与优化方法

文章目录 &#x1f340;引言&#x1f340;模型评估方法&#x1f340;均方误差&#xff08;MSE&#xff09;&#x1f340;均方根误差&#xff08;RMSE&#xff09;&#x1f340;绝对平均误差&#xff08;MAE&#xff09;&#x1f340;模型优化策略&#x1f340;特征工程&#x1…

电商数据采集和数据分析

不管是做渠道价格的治理&#xff0c;还是做窜货、假货的打击&#xff0c;都需要品牌对线上数据尽数掌握&#xff0c;准确的数据是驱动服务的关键&#xff0c;所以做好电商数据的采集和分析非常重要。 当线上链接较多&#xff0c;品牌又需要监测线上数据时&#xff0c;单靠人工肯…

P14-CVPR2022-1.0-RepLKNet31

论文地址:https://arxiv.org/abs/2203.06717 代码地址:GitHub - MegEngine/RepLKNet: Official MegEngine implementation of RepLKNet ‘ 目录 Abstract 一.Introduction 二.Related Work 2.1Model with Large Kernels 2.2Model Scaling Techniques 2.3Structural Re-…

基于数据湖的多流拼接方案-HUDI概念篇

目录 一、为什么需要HUDI&#xff1f; 1. 传统技术选型存在哪些问题&#xff1f; 2. Hudi有什么优点&#xff1f; 基于 Hudi Payload 机制的多流拼接方案&#xff1a; 二、HUDI的应用场景 1. 什么场景适合使用hudi&#xff1f; 2. 什么场景不适合使用hudi&#xff1f; …

数据分析案例-汽车客户信息数据可视化分析(文末送书)

&#x1f935;‍♂️ 个人主页&#xff1a;艾派森的个人主页 ✍&#x1f3fb;作者简介&#xff1a;Python学习者 &#x1f40b; 希望大家多多支持&#xff0c;我们一起进步&#xff01;&#x1f604; 如果文章对你有帮助的话&#xff0c; 欢迎评论 &#x1f4ac;点赞&#x1f4…

用加持了大模型的 Byzer-Notebook 做数据分析是什么体验

Byzer-Notebook 是专门为 SQL 而研发的一款 Web Notebook。他的第一公民是 SQL&#xff0c;而 Jupyter 则是是以 Python 为第一公民的。 随着 Byzer 引擎对大模型能力的支持日渐完善&#xff0c; Byzer-Notebook 也在不自觉中变得更加强大。我和小伙伴在聊天的过程中才发现他已…

Android 12 源码分析 —— 应用层 二(SystemUI大体组织和启动过程)

Android 12 源码分析 —— 应用层 二&#xff08;SystemUI大体组织和启动过程&#xff09; 在前一篇文章中&#xff0c;我们介绍了SystemUI怎么使用IDE进行编辑和调试。这是分析SystemUI的最基础&#xff0c;希望读者能尽量掌握。 本篇文章&#xff0c;将会介绍SystemUI的大概…

职业技术培训内容介绍

泰迪职业技术培训包括&#xff1a;Python技术应用、大数据技术应用、机器学习、大数据分析 、人工智能技术应用。 职业技术培训-Python技术应用 “Python技术应用工程师”职业技术认证是由工业和信息化部教育与考试中心推出一套专业化、科学化、系统化的人才考核标准&…

行业追踪,2023-08-24

自动复盘 2023-08-24 凡所有相&#xff0c;皆是虚妄。若见诸相非相&#xff0c;即见如来。 k 线图是最好的老师&#xff0c;每天持续发布板块的rps排名&#xff0c;追踪板块&#xff0c;板块来开仓&#xff0c;板块去清仓&#xff0c;丢弃自以为是的想法&#xff0c;板块去留让…

Hadoop分布式计算与资源调度:打开专业江湖的魔幻之门

文章目录 版权声明一 分布式计算概述1.1 分布式计算1.2 分布式&#xff08;数据&#xff09;计算模式1.3 小结 二 MapReduce概述2.1 分布式计算框架 - MapReduce2.2 MapReduce执行原理2.3 小结 三 YARN概述3.1 YARN & MapReduce3.2 资源调度3.3 程序的资源调度3.4 YARN的资…