Helm简介、安装、配置、使用!

news2025/5/24 19:02:16

一、简介

Helm 是 Kubernetes 的包管理器。包管理器类似于我们在 Ubuntu 中使用的apt、Centos中使用的yum 或者Python中的 pip 一样,能快速查找、下载和安装软件包。Helm 由客户端组件 helm 和服务端组件 Tiller 组成, 能够将一组K8S资源打包统一管理, 是查找、共享和使用为Kubernetes构建的软件的最佳方式。

Helm3之前是C/S架构的。主要分为客户端 helm 和服务端 TillerTiller负责对charts的解析生成k8s资源声明文件,然后调用k8s api进行部署。同时还保存chart部署的版本信息。

Helm3移除了 Tiller,直接在客户端就对charts进行解析,调用k8s api部署资源声明文件。同时将charts release的版本信息保存至对应k8s应用部署所在命名空间下的secret中。(例如:名为sh.helm.release.v1.sentry-kubernetes-events.v1 helm.sh/release.v1类型的secret)

全面拥抱Helm3

二、安装

Github下载地址:Releases · helm/helm · GitHub

1、二进制包安装

  • 下载二进制文件解压至系统环境路径下即可。

  • 命令脚本

    curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3
    chmod 700 get_helm.sh
    ./get_helm.sh
    
    # 或者
    curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash

2、包管理器安装

  • Brew

    brew install helm
    

3、源码编译安装

$ cd $GOPATH
$ mkdir -p src/helm.sh
$ cd src/helm.sh
$ git clone https://github.com/helm/helm.git
$ cd helm
$ make

三、配置

helm3默认读取当前用户目录下~/.kube/config文件中的当前k8s环境上下文来配置部署charts到哪个k8s集群。相关权限跟随着kuectl配置的用户权限。(开箱即用的感觉)

1、配置helm的环境变量

NameDescription
$XDG_CACHE_HOMEset an alternative location for storing cached files.
$XDG_CONFIG_HOMEset an alternative location for storing Helm configuration.
$XDG_DATA_HOMEset an alternative location for storing Helm data.
$HELM_DRIVERset the backend storage driver. Values are: configmap, secret, memory
$HELM_NO_PLUGINSdisable plugins. Set HELM_NO_PLUGINS=1 to disable plugins.
$KUBECONFIGset an alternative Kubernetes configuration file (default "~/.kube/config")

2、Helm相关文件存储的默认路径

  • cached文件都存在$XDG_CACHE_HOME/helm
  • 配置文件存在 $XDG_CONFIG_HOME/helm
  • 数据文件存在$XDG_DATA_HOME/helm

3、各个操作操作系统的默认配置

操作系统Cache文件路径配置文件路径数据文件路径
Linux$HOME/.cache/helm$HOME/.config/helm$HOME/.local/share/helm
macOS$HOME/Library/Caches/helm$HOME/Library/Preferences/helm$HOME/Library/helm
Windows%TEMP%\helm%APPDATA%\helm%APPDATA%\helm

4、命令行的命令补全

helm completion zsh
source <(helm completion zsh)

四、charts的管理

全局通用的命令行参数

--add-dir-header                   添加文件路径到Header中
--alsologtostderr                  log to standard error as well as files
--debug                            输出Debug级别的日志
--kube-context string              指定使用哪个kubeconfig context
--kubeconfig string                指定kubeconfig文件路径
--log-backtrace-at traceLocation   when logging hits line file:N, emit a stack trace (default :0)
--log-dir string                   指定日志输出到哪个路径下
--log-file string                  指定日志输出到哪个文件中
--log-file-max-size uint           Defines the maximum size a log file can grow to. Unit is megabytes. If the value is 0, the maximum file size is unlimited. (default 1800)
--logtostderr                      log to standard error instead of files (default true)
-n, --namespace string             指定在哪个K8S命名空间下进行操作
--registry-config string           path to the registry config file (default "/Users/curiouser/Library/Preferences/helm/registry.json")
--repository-cache string          path to the file containing cached repository indexes (default "/Users/curiouser/Library/Caches/helm/repository")
--repository-config string         path to the file containing repository names and URLs (default "/Users/curiouser/Library/Preferences/helm/repositories.yaml")
--skip-headers                     If true, avoid header prefixes in the log messages
--skip-log-headers                 If true, avoid headers when opening log files
--stderrthreshold severity         logs at or above this threshold go to stderr (default 2)
-v, --v Level                          number for the log level verbosity
--vmodule moduleSpec               comma-separated list of pattern=N settings for file-filtered logging

1、远程Charts仓库的管理

添加远程charts仓库

helm repo add 远程仓库别名 https://kubernetes-charts-incubator.storage.googleapis.com/

查看当前所有的远程charts仓库

helm repo list

删除指定的远程charts仓库

helm repo rm/remove 远程仓库别名

查看远程仓库中的所有charts

helm search repo

查看Github中的所有charts

helm search hub

2、Charts的管理

从远程仓库中下载Charts到本地

helm pull 远程仓库别名/chart名 参数项

# 参数项
--ca-file string       verify certificates of HTTPS-enabled servers using this CA bundle
--cert-file string     identify HTTPS client using this SSL certificate file
-d/--destination string   location to write the chart. If this and tardir are specified, tardir is appended to this (default ".")
--devel                use development versions, too. Equivalent to version '>0.0.0-0'. If --version is set, this is ignored.
-h/--help                 help for pull
--key-file string      identify HTTPS client using this SSL key file
--keyring string       location of public keys used for verification (default "/Users/curiouser/.gnupg/pubring.gpg")
--password string      chart repository password where to locate the requested chart
--prov                 fetch the provenance file, but don't perform verification
--repo string          chart repository url where to locate the requested chart
--untar                下载后解压
--untardir string      下载后解压到指定目录(默认是当前路径".")
--username string      chart repository username where to locate the requested chart
--verify               verify the package before installing it
--version string       specify the exact chart version to install. If this is not specified, the latest version is installed

# 支持全局通用参数

五、部署Charts到k8s集群

命令格式

helm install [NAME] [CHART] [参数项]

# 参数项
--atomic                       原子部署。当charts部署失败时,所有操作进行回滚删除。同时如果设置该参数,                                                                一并的"--wait"也会被设置
--ca-file string               verify certificates of HTTPS-enabled servers using this CA bundle
--cert-file string             identify HTTPS client using this SSL certificate file
--dependency-update            在部署前更新charts依赖
--description string           添加自定义描述
--devel                        use development versions, too. Equivalent to version '>0.0.0-0'. If --version is set, this is ignored
--disable-openapi-validation   if set, the installation process will not validate rendered templates against the Kubernetes OpenAPI Schema
--dry-run                      模拟部署
-g, --generate-name                generate the name (and omit the NAME parameter)
-h, --help                     显示帮助信息
--key-file string              identify HTTPS client using this SSL key file
--keyring string               location of public keys used for verification (default "/Users/curiouser/.gnupg/pubring.gpg")
--name-template string         specify template used to name the release
--no-hooks                     prevent hooks from running during install
-o, --output format            指定日志输出的格式(可选项table, json, yaml 默认是table)
--password string              远程chart仓库用户的密码
--post-renderer postrenderer   the path to an executable to be used for post rendering. If it exists in $PATH, the binary will be used, otherwise it will try to look for the executable at the given path (default exec)
--render-subchart-notes        if set, render subchart notes along with the parent
--replace                      re-use the given name, only if that name is a deleted release which remains in the history. This is unsafe in production
--repo string                  设置远程chart仓库的url
--set stringArray              设置vaules。(覆盖values.yaml中的值可设置多个,以“,”分割。例如            
                                                             key1=val1,key2=val2)
--set-file stringArray         从文件中读取va luset values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)
--set-string stringArray       set STRING values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
--skip-crds                    if set, no CRDs will be installed. By default, CRDs are installed if not already present
--timeout duration             time to wait for any individual Kubernetes operation (like Jobs for hooks) (默认5分0秒)
--username string              远程chart仓库的用户名
  -f, --values strings         指定values文件或URL(可设置多个)
--verify                       verify the package before installing it
--version string               specify the exact chart version to install. If this is not specified, the latest version is installed
--wait                         设置等待charts涉及的k8s资源变为ready状态的时间才认为部署成功。它的值等                                                                同timeout设置的值例如Pods, PVCs, Services, Deployment的最少POD数,                                                                 StatefulSet, or ReplicaSet )
# 支持全局通用参数

1、部署远程仓库中的charts到k8s集群

 helm install 部署名 远程仓库别名/chart名 参数项

2、部署本地的Charts到k8s集群

helm install 部署名 -f values.yaml .

3、更新charts的部署

helm upgrade charts的部署名 -f values.yaml .

# 参数项
--atomic                       原子更新。当charts更新部署失败时,所有操作进行回滚删除。同时如果设置该参
                               数,一并的"--wait"也会被设置
--ca-file string               verify certificates of HTTPS-enabled servers using this CA bundle
--cert-file string             identify HTTPS client using this SSL certificate file
--cleanup-on-fail              allow deletion of new resources created in this upgrade when upgrade fails
--description string           添加自定义描述
--devel                        use development versions, too. Equivalent to version '>0.0.0-0'. If --version is set, this is ignored
--dry-run                      模拟更新部署
--force                        force resource updates through a replacement strategy
-h, --help                     显示帮助信息
--history-max int              limit the maximum number of revisions saved per release. Use 0 for no limit (default 10)
-i, --install                  如果指定的chart部署名不存在,就直接安装
--key-file string              identify HTTPS client using this SSL key file
--keyring string               指定验证时公钥的路径(默认当前用户路径下的.gnupg/pubring.gpg")
--no-hooks                     disable pre/post upgrade hooks
-o, --output format            指定日志输出的格式(可选项table, json, yaml 默认是table)
--password string              远程chart仓库用户的密码
--post-renderer postrenderer   the path to an executable to be used for post rendering. If it exists in $PATH, the binary will be used, otherwise it will try to look for the executable at the given path (default exec)
--render-subchart-notes        if set, render subchart notes along with the parent
--repo string                  设置远程chart仓库的url
--reset-values                 when upgrading, reset the values to the ones built into the chart
--reuse-values                 when upgrading, reuse the last release's values and merge in any overrides from the command line via --set and -f. If '--reset-values' is specified, this is ignored
--set stringArray              设置vaules。(覆盖values.yaml中的值可设置多个,以“,”分割。例如            
                                                             key1=val1,key2=val2)
--set-file stringArray         set values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)
--set-string stringArray       set STRING values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
--timeout duration             time to wait for any individual Kubernetes operation (like Jobs for hooks) (默认5分0秒)
--username string              远程chart仓库的用户名
-f, --values strings           指定values文件或URL(可设置多个)
--verify                       verify the package before installing it
--version string               specify the exact chart version to install. If this is not specified, the latest version is installed
--wait                         设置等待charts涉及的k8s资源变为ready状态的时间才认为部署成功。它的值等                                                                同timeout设置的值例如Pods, PVCs, Services, Deployment的最少POD数,                                                                 StatefulSet, or ReplicaSet )
# 支持全局通用参数

4、删除部署charts的资源

默认删除charts涉及的所有资源和charts的发布版本

helm del/uninstall/del/delete/un charts的部署名 参数项
# 参数项
--description string   添加自定义描述
--dry-run              模拟删除
-h, --help             显示帮助信息
--keep-history         删除charts涉及的所有资源,然后标记该charts的发布为删除状态,但保留删除历史
--no-hooks             prevent hooks from running during uninstallation
--timeout duration     time to wait for any individual Kubernetes operation (like Jobs for hooks) (默认5m0s)
# 支持全局通用参数

六、其他操作

1、value文件中的List数组配置映射到命令行 set中

# values.yaml中参数
globalArguments:
  - "--api.disabledashboardad=false"
  - "--global.checknewversion=false"
  - "--global.sendanonymoususage=false"
  - "--api.insecure=false"
  - "--accesslog=true"
  - "--accesslog.fields.names.accesslog"
  - "--accesslog.fields.headers.defaultmode=keep"
  - "--accesslog.filepath=/data/400-599-reponse-json.log"
  - "--accesslog.format=json"
  - "--accesslog.filters.statuscodes=400-599"

# 映射为 set参数值
helm upgrade --install traefik-ingress-controller \
      --version 24.0.0 \
      --namespace kube-system \
      --set ports.traefik.hostPort=9000 \
      --set deployment.replicas=2 \
      --set globalArguments="{"--api.disabledashboardad=false","--global.sendanonymoususage=false","--global.checknewversion=false","--accesslog=true","--accesslog.fields.names.accesslog","--accesslog.fields.headers.defaultmode=keep","--accesslog.filepath=/data/400-599-reponse-json.log","--accesslog.format=json","--accesslog.filters.statuscodes=400-599"}" \
      --set service.type=ClusterIP \
      --set hostNetwork=true \
      traefik/traefik

2、value文件中的对象数组配置映射到命令行 set中

# values.yaml中参数
server:
  ingress:
    hosts:
      - host: chart-example.local
        paths: []

# 映射为 set参数值
helm upgrade --install vault 
    --namespace tools hashicorp/vault \
    --set "server.ingress.enabled=true" \
    --set "server.ingress.hosts[0].host=vault.test.com"

3、value文件中的完整对象数组配置映射到命令行 set中

extraObjects:
  - apiVersion: v1
    kind: Service
    metadata:
      name: traefik-api
    spec:
      type: ClusterIP
      selector:
        app.kubernetes.io/name: traefik
        app.kubernetes.io/instance: traefik-default
      ports:
      - port: 8080
        name: traefik
        targetPort: 9000
        protocol: TCP
  - apiVersion: v1
    kind: Secret
    metadata:
      name: traefik-dashboard-auth-secret
    type: kubernetes.io/basic-auth
    stringData:
      username: admin
      password: changeme

  - apiVersion: traefik.io/v1alpha1
    kind: Middleware
    metadata:
      name: traefik-dashboard-auth
    spec:
      basicAuth:
        secret: traefik-dashboard-auth-secret
  - apiVersion: networking.k8s.io/v1
    kind: Ingress
    metadata:
      name: traefik-dashboard
      annotations:
        traefik.ingress.kubernetes.io/router.entrypoints: websecure
        traefik.ingress.kubernetes.io/router.middlewares: default-traefik-dashboard-auth@kubernetescrd




 helm upgrade --install --atomic traefik-ingress-controller \
      --version 24.0.0 \
      --namespace kube-system \
      --set extraObjects[0].apiVersion=v1 \
      --set extraObjects[0].kind=Service \
      --set extraObjects[0].metadata.name=traefik-api \
      --set extraObjects[0].spec.type=ClusterIP \
      --set extraObjects[0].spec.ports[0].port=8080 \
      --set extraObjects[0].spec.ports[0].name=traefik \
      --set extraObjects[0].spec.ports[0].targetPort=9000 \
      --set extraObjects[0].spec.ports[0].protocol=TCP \
      --set extraObjects[0].spec.selector."app\.kubernetes\.io\/name"="traefik" \
      --set extraObjects[0].spec.selector."app\.kubernetes\.io\/instance"="traefik-default" \
      --set extraObjects[1].apiVersion=v1 \
      --set extraObjects[1].kind=Secret \
      --set extraObjects[1].metadata.name=traefik-dashboard-auth-secret \
      --set extraObjects[1].type=kubernetes.io/basic-auth \
      --set extraObjects[1].stringData.username=admin \
      --set extraObjects[1].stringData.password=changeme \
      --set extraObjects[2].apiVersion=traefik.io/v1alpha1 \
      --set extraObjects[2].kind=Middleware \
      --set extraObjects[2].metadata.name=traefik-dashboard-auth \
      --set extraObjects[2].spec.basicAuth.secret=traefik-dashboard-auth-secret \
      --set extraObjects[3].apiVersion=networking.k8s.io/v1 \
      --set extraObjects[3].kind=Ingress \
      --set extraObjects[3].metadata.name=traefik-dashboard \
      --set extraObjects[3].spec.rules[0].host=traefik-dashboard.test.com \
      --set extraObjects[3].spec.rules[0].http.paths[0].path=/ \
      --set extraObjects[3].spec.rules[0].http.paths[0].pathType=Prefix \
      --set extraObjects[3].spec.rules[0].http.paths[0].backend.service.name=traefik-api \
      --set extraObjects[3].spec.rules[0].http.paths[0].backend.service.port.name=traefik \
      --set extraObjects[3].metadata.annotations."traefik\.ingress\.kubernetes\.io\/router\.entrypoints"="websecure" \
      --set extraObjects[3].metadata.annotations."traefik\.ingress\.kubernetes\.io\/router\.middlewares"="default-traefik-dashboard-auth@kubernetescrd" \
      traefik/traefik

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

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

相关文章

LLM笔记(九)KV缓存(2)

文章目录 1. 背景与动机2. 不使用 KV Cache 的情形2.1 矩阵形式展开2.2 计算复杂度 3. 使用 KV Cache 的优化3.1 核心思想3.2 矩阵形式展开3.3 计算复杂度对比 4. 总结5. GPT-2 中 KV 缓存的实现分析5.1 缓存的数据结构与类型5.2 在注意力机制 (GPT2Attention) 中使用缓存5.3 缓…

LVS 负载均衡集群应用实战

前提:三台虚拟机,有nginx,要做负载 1. LVS-server 安装lvs管理软件 [root@lvs-server ~]# yum -y install ipvsadm 程序包:ipvsadm(LVS管理工具) 主程序:/usr/sbin/ipvsadm 规则保存工具:/usr/sbin/ipvsadm-save > /path/to/file 配置文件:/etc/sysconfig/ipvsad…

MySQL——基本查询内置函数

目录 CRUD Create Retrieve where order by limit Update Delete 去重操作 聚合函数 聚合统计 内置函数 日期函数 字符函数 数学函数 其它函数 实战OJ 批量插入数据 找出所有员工当前薪水salary情况 查找最晚入职员工的所有信息 查找入职员工时间升序排…

Day34打卡 @浙大疏锦行

知识点回归&#xff1a; CPU性能的查看&#xff1a;看架构代际、核心数、线程数GPU性能的查看&#xff1a;看显存、看级别、看架构代际GPU训练的方法&#xff1a;数据和模型移动到GPU device上类的call方法&#xff1a;为什么定义前向传播时可以直接写作self.fc1(x) 作业 计算资…

AdGuard解锁高级版(Nightly)_v4.10.36 安卓去除手机APP广告

AdGuard解锁高级版(Nightly)_v4.10.36 安卓去除手机APP广告 AdGuard Nightly是AdGuard团队为及时更新软件而推出的最新测试版本&#xff0c;适合追求最新功能和愿意尝试新版本的用户。但使用时需注意其潜在的不稳定性和风险。…

C++修炼:红黑树的模拟实现

Hello大家好&#xff01;很高兴我们又见面啦&#xff01;给生活添点passion&#xff0c;开始今天的编程之路&#xff01; 我的博客&#xff1a;<但凡. 我的专栏&#xff1a;《编程之路》、《数据结构与算法之美》、《题海拾贝》、《C修炼之路》 欢迎点赞&#xff0c;关注&am…

基于Python+YOLO模型的手势识别系统

本项目是一个基于Python、YOLO模型、PyQt5的实时手势识别系统&#xff0c;通过摄像头或导入图片、视频&#xff0c;能够实时识别并分类不同的手势动作。系统采用训练好的深度学习模型进行手势检测和识别&#xff0c;可应用于人机交互、智能控制等多种场景。 1、系统主要功能包…

自制操作系统day10叠加处理

day10叠加处理 叠加处理&#xff08;harib07b&#xff09; 现在是鼠标的叠加处理&#xff0c;以后还有窗口的叠加处理 涉及图层 最上面小图层是鼠标指针&#xff0c;最下面的一张图层用来存放桌面壁纸。移动图层的方法实现鼠标指针的移动以及窗口的移动。 struct SHEET { u…

鸿蒙Flutter实战:23-混合开发详解-3-源码模式引入

引言 在前面的文章混合开发详解-2-Har包模式引入中&#xff0c;我们介绍了如何将 Flutter 模块打包成 Har 包&#xff0c;并引入到原生鸿蒙工程中。本文中&#xff0c;我们将介绍如何通过源码依赖的方式&#xff0c;将 Flutter 模块引入到原生鸿蒙工程中。 创建工作 创建一个…

leetcode:2469. 温度转换(python3解法,数学相关算法题)

难度&#xff1a;简单 给你一个四舍五入到两位小数的非负浮点数 celsius 来表示温度&#xff0c;以 摄氏度&#xff08;Celsius&#xff09;为单位。 你需要将摄氏度转换为 开氏度&#xff08;Kelvin&#xff09;和 华氏度&#xff08;Fahrenheit&#xff09;&#xff0c;并以数…

【软件安装】Windows操作系统中安装mongodb数据库和mongo-shell工具

这篇文章&#xff0c;主要介绍Windows操作系统中如何安装mongodb数据库和mongo-shell工具。 目录 一、安装mongodb数据库 1.1、下载mongodb安装包 1.2、添加配置文件 1.3、编写启动脚本&#xff08;可选&#xff09; 1.4、启动服务 二、安装mongo-shell工具 2.1、下载mo…

记共享元素动画导致的内存泄露

最近在给项目的预览图片页增加共享元素动画的时候&#xff0c;发现了LeakCanary一直报内存泄露。 LeakCanary日志信息 ┬─── │ GC Root: Thread object │ ├─ java.lang.Thread instance │ Leaking: NO (the main thread always runs) │ Thread name: main │ …

Flyweight(享元)设计模式 软考 享元 和 代理属于结构型设计模式

1.目的&#xff1a;运用共享技术有效地支持大量细粒度的对象 Flyweight&#xff08;享元&#xff09;设计模式 是一种结构型设计模式&#xff0c;它的核心目的是通过共享对象来减少内存消耗&#xff0c;特别是在需要大量相似对象的场景中。Flyweight 模式通过将对象的共享细节与…

服务器网络配置 netplan一个网口配置两个ip(双ip、辅助ip、别名IP别名)

文章目录 问答 问 # This is the network config written by subiquity network:ethernets:enp125s0f0:dhcp4: noaddresses: [192.168.90.180/24]gateway4: 192.168.90.1nameservers:addresses:- 172.0.0.207- 172.0.0.208enp125s0f1:dhcp4: trueenp125s0f2:dhcp4: trueenp125…

响应面法(Response Surface Methodology ,RSM)

响应面法是一种结合统计学和数学建模的实验优化技术&#xff0c;通过有限的实验数据&#xff0c;建立输入变量与输出响应之间的数学模型&#xff0c;找到最优操作条件。 1.RSM定义 RSM通过设计实验、拟合数学模型&#xff08;如多项式方程&#xff09;和分析响应曲面&#xff…

Spring Boot 拦截器:解锁5大实用场景

一、Spring Boot中拦截器是什么 在Spring Boot中&#xff0c;拦截器&#xff08;Interceptor&#xff09;是一种基于AOP&#xff08;面向切面编程&#xff09;思想的组件&#xff0c;用于在请求处理前后插入自定义逻辑&#xff0c;实现权限校验、日志记录、性能监控等非业务功能…

有两个Python脚本都在虚拟环境下运行,怎么打包成一个系统服务,按照顺序启动?

环境&#xff1a; SEMCP searx.webapp python 问题描述&#xff1a; 有两个python脚本都在虚拟环境下运行&#xff0c;怎么打包成一个系统服务&#xff0c;按照顺序启动&#xff1f; 解决方案&#xff1a; 将这两个 Python 脚本打包成有启动顺序的系统服务&#xff0c;最…

Python 脚本执行命令的深度探索:方法、示例与最佳实践

在现代软件开发过程中&#xff0c;Python 脚本常常需要与其他工具和命令进行交互&#xff0c;以实现自动化任务、跨工具数据处理等功能。Python 提供了多种方式来执行外部命令&#xff0c;并获取其输出&#xff0c;重定向到文件&#xff0c;而不是直接在终端中显示。这种能力使…

PotPlayer 4K 本地万能影音播放器

今日分享一款来自吾爱论坛大佬分享的啥都能播的的本地播放器&#xff0c;不管是不管是普通视频、4K超清、蓝光3D&#xff0c;还是冷门格式&#xff0c;它基本都能搞定。而且运行流畅不卡顿&#xff0c;电脑配置低也能靠硬件加速&#xff0c;让你根本停不下来。 自带解码器&…

2025年电工杯A题第一版本Q1-Q4详细思路求解+代码运行

A题 光伏电站发电功率日前预测问题 问题背景 光伏发电是通过半导体材料的光电效应&#xff0c;将太阳能直接转化为电能的技术。光伏电站是由众多光伏发电单元组成的规模化发电设施。 光伏电站的发电功率主要由光伏板表面接收到的太阳辐射总量决定&#xff0c;不同季节太阳光…