06 2023 档案

摘要:使用自定义资源 —— 服务发现信息 我们看看 kubectl 使用 API 服务器所提供的服务发现信息来找到新的资源。让我们一起来深入理解一下这个发现机制。 为 kubectl 启用更高级别的日志,我们便能从日志中了解到 kubectl 是如何发现这种新的资源类型的: [root@JumperSer 阅读全文
posted @ 2023-06-30 15:27 左扬 阅读(81) 评论(0) 推荐(0) 编辑
摘要:介绍自定义资源(Custom Resource,CR) 自定义资源(Custom Resource,CR),它是整个 Kubernetes 生态系统中最核心的扩展机制。 定义资源可以用作系统内部使用的对象,仅仅对它进行声明式定义,而不关联控制器逻辑,用不保存少量配置信息。但是自定义资源也可以成为很多 阅读全文
posted @ 2023-06-30 14:27 左扬 阅读(228) 评论(0) 推荐(1) 编辑
摘要:Golang 类型转换为 GVK、GVR 和 HTTP 路径,API Machinery概览 阅读全文
posted @ 2023-06-30 11:57 左扬 阅读(101) 评论(0) 推荐(0) 编辑
摘要:深入 API Machinery —— Scheme https://github.com/kubernetes/apimachinery/tree/release-1.27/pkg/runtime 1、scheme 我理解意思是说: Scheme 是 Kubernetes client-go 库中 阅读全文
posted @ 2023-06-30 10:42 左扬 阅读(227) 评论(0) 推荐(0) 编辑
摘要:深入 API Machinery —— REST 映射 https://github.com/kubernetes/client-go/blob/release-1.27/restmapper/ GVK 与 GVR 之间的映射关系被称为 REST 映射。 我理解意思是说: 在 Kubernetes 阅读全文
posted @ 2023-06-30 10:00 左扬 阅读(238) 评论(0) 推荐(0) 编辑
摘要:深入 API Machinery —— Resource Resource 有分组和版本号,所以也有对应的 GroupVersionResource 概念,简写为 GVR。 每种 GVR 对应一个 HTTP(基础)路径。GVR 用于表示 Kubernetes API 的 REST 端点。比如 app 阅读全文
posted @ 2023-06-30 09:43 左扬 阅读(40) 评论(0) 推荐(0) 编辑
摘要:深入 API Machinery —— Kind 1、API Machinery 中 Kind 我理解意思是说: 在Kubernetes中,API Machinery 是一个核心的软件库,用于构建 Kubernetes 的 API 服务器和控制器。它提供了一些基本的功能,如对象存储、认证鉴权、API 阅读全文
posted @ 2023-06-29 17:23 左扬 阅读(79) 评论(0) 推荐(0) 编辑
摘要:工作队列(workqueue[wɜːk][kjuː]) https://github.com/kubernetes/kubernetes/tree/release-1.27/staging/src/k8s.io/client-go/util/workqueue 我理解意思是说: 这里说的 "工作队列 阅读全文
posted @ 2023-06-29 16:09 左扬 阅读(171) 评论(0) 推荐(0) 编辑
摘要:Informer[ɪnˈfɔrmɚ] 和缓存 https://github.com/kubernetes/kubernetes/tree/release-1.27/staging/src/k8s.io/client-go/informers k8s 客户端接口中包含一个名叫 Watch 的动作,它提 阅读全文
posted @ 2023-06-29 11:10 左扬 阅读(988) 评论(0) 推荐(0) 编辑
摘要:Watch https://github.com/kubernetes/apimachinery/blob/release-1.27/pkg/watch/watch.go 我理解意思是说:k8s.io/apimachinery/pkg/watch/watch.go 文件是 Kubernetes 中用 阅读全文
posted @ 2023-06-28 16:19 左扬 阅读(387) 评论(0) 推荐(0) 编辑
摘要:ObjectMeta https://github.com/kubernetes/apimachinery/blob/release-1.27/pkg/apis/meta/v1/types.go 我理解意思是说:在 Kubernetes 中,ObjectMeta 是一个结构体,用于表示资源对象的元数 阅读全文
posted @ 2023-06-28 15:17 左扬 阅读(107) 评论(0) 推荐(0) 编辑
摘要:TypeMeta https://github.com/kubernetes/apimachinery/blob/release-1.27/pkg/runtime/types.go 我理解意思是说: TypeMeta 是所有顶级对象共享的类型。你可以通过嵌入 runtime.TypeMeta 的方式 阅读全文
posted @ 2023-06-28 14:32 左扬 阅读(116) 评论(0) 推荐(0) 编辑
摘要:Go语言中的 Kubernetes 对象介绍 我们接下来更详细了解在 Go 语言的语境下的 Pod(或者其他任何 Kubernetes 资源)是什么样的? Kubernetes 中的资源(或者更准确说是对象)都是某种类型的实例。 我理解意思是说: 在Kubernetes中,资源或对象是指由 Kube 阅读全文
posted @ 2023-06-28 10:54 左扬 阅读(197) 评论(0) 推荐(0) 编辑
摘要:修改客户端默认支持 Protobuf 一、在 kubernetes 客户端中修改默认支持 Protobuf 确保你已经安装了kubectl命令行工具,并且版本在1.14.0或更高。 打开~/.kube/config文件,该文件存储了你的Kubernetes集群配置信息。 找到clusters部分,并 阅读全文
posted @ 2023-06-28 10:22 左扬 阅读(323) 评论(0) 推荐(0) 编辑
摘要:client-go 基础 https://kubernetes.io/docs/reference/using-api/client-libraries/ https://github.com/kubernetes/client-go/ Kubernetes 项目提供了一系列可供第三方使用的 Git 阅读全文
posted @ 2023-06-26 16:20 左扬 阅读(465) 评论(0) 推荐(0) 编辑
摘要:API服务器是如何处理请求的 Kubernetes API 服务器是 Kuberntes 控制平面中的一部分,负责对集群中的各种资源对象进行管理和操作。它通过提供一组 RESTful API 接口,用户和其他组件可以利用这些接口与集群进行交互。 当 Kubernetes API 接收到一个 HTTP 阅读全文
posted @ 2023-06-26 15:29 左扬 阅读(83) 评论(0) 推荐(0) 编辑
摘要:查询集群所支持的不同资源版本 [root@JumperServer:~] # kubectl api-versions admissionregistration.k8s.io/v1alpha1 admissionregistration.k8s.io/v1beta1 apiextensions.k 阅读全文
posted @ 2023-06-26 15:23 左扬 阅读(48) 评论(0) 推荐(0) 编辑
摘要:查询集群提供哪些API资源 [root@JumperServer:~] # kubectl api-resources NAME SHORTNAMES APIVERSION NAMESPACED KIND bindings v1 true Binding componentstatuses cs v 阅读全文
posted @ 2023-06-26 15:22 左扬 阅读(59) 评论(0) 推荐(0) 编辑
摘要:通过命令行使用 API 长话短说,我们将使用以 batch API 组为例来讲 cli 相关的操作。 首先,需要在终端运行下面的命令: [root@localhost ~]# kubectl proxy --port=8089 Starting to serve on 127.0.0.1:8089 阅读全文
posted @ 2023-06-26 15:20 左扬 阅读(57) 评论(0) 推荐(0) 编辑
摘要:Kubernetes API 版本控制 https://kubernetes.io/zh-cn/docs/reference/using-api/#api-reference 为了提高可扩展性,Kubernetes 支持在不同的 API 路径下提供不同版本的 API,比如 /api/v1 或 /ap 阅读全文
posted @ 2023-06-26 15:06 左扬 阅读(83) 评论(0) 推荐(0) 编辑
摘要:gpu 驱动安装失败处理 描述: 部署完平台后,nvidia-smi 命令不存在,或者不能检测到 gpu,平台 gpu 功能不可用。 关键字: gpu, driver, nvidia, clever, docker 现象: 在部署时,Install nvidia driver 这个过程会输出失败日志 阅读全文
posted @ 2023-06-25 09:56 左扬 阅读(155) 评论(0) 推荐(0) 编辑
摘要:如何验证 GPU 模块是否正常? gpu 节点上,运行 nvidia-smi 能正常返回并识别出 GPU 的型号等信息; 通过 ls -la /dev/ | grep nvidia 能看到 nvidia0 等的 GPU 设备。 gpu 节点上,运行 docker info | grep Runtim 阅读全文
posted @ 2023-06-25 09:53 左扬 阅读(212) 评论(0) 推荐(0) 编辑
摘要:REST APIs —— Cluster APIs —— Cluster update settings API https://www.elastic.co/guide/en/elasticsearch/reference/8.8/cluster-update-settings.html#clus 阅读全文
posted @ 2023-06-24 23:47 左扬 阅读(50) 评论(0) 推荐(0) 编辑
摘要:REST APIs —— Cluster APIs —— Cluster stats API https://www.elastic.co/guide/en/elasticsearch/reference/8.8/cluster-stats.html#cluster-stats Returns cl 阅读全文
posted @ 2023-06-24 23:34 左扬 阅读(60) 评论(0) 推荐(0) 编辑
摘要:REST APIs —— Cluster APIs —— Cluster state API https://www.elastic.co/guide/en/elasticsearch/reference/8.8/cluster-state.html#cluster-state Returns an 阅读全文
posted @ 2023-06-24 23:19 左扬 阅读(30) 评论(0) 推荐(0) 编辑
摘要:REST APIs —— Cluster APIs —— Cluster reroute API https://www.elastic.co/guide/en/elasticsearch/reference/8.8/cluster-reroute.html#cluster-reroute Chan 阅读全文
posted @ 2023-06-24 23:08 左扬 阅读(61) 评论(0) 推荐(0) 编辑
摘要:REST APIs —— Cluster APIs —— Cluster health API https://www.elastic.co/guide/en/elasticsearch/reference/8.8/cluster-health.html#cluster-health Returns 阅读全文
posted @ 2023-06-24 22:53 左扬 阅读(38) 评论(0) 推荐(0) 编辑
摘要:REST APIs —— Cluster APIs —— Cluster get settings API https://www.elastic.co/guide/en/elasticsearch/reference/8.8/cluster-get-settings.html#cluster-ge 阅读全文
posted @ 2023-06-24 22:44 左扬 阅读(28) 评论(0) 推荐(0) 编辑
摘要:REST APIs —— Cluster APIs —— Cluster allocation explain API(用于提供关于特定分片当前分配情况的解释) https://www.elastic.co/guide/en/elasticsearch/reference/8.8/cluster-a 阅读全文
posted @ 2023-06-24 21:40 左扬 阅读(375) 评论(0) 推荐(0) 编辑
摘要:REST APIs —— Cluster APIs —— Node specification(节点过滤) https://www.elastic.co/guide/en/elasticsearch/reference/8.8/cluster.html#cluster-nodes Some clus 阅读全文
posted @ 2023-06-24 20:19 左扬 阅读(22) 评论(0) 推荐(0) 编辑
摘要:Aggregations —— Pipeline aggregations(管道聚合) https://www.elastic.co/guide/en/elasticsearch/reference/8.8/search-aggregations-pipeline.html#search-aggre 阅读全文
posted @ 2023-06-15 09:53 左扬 阅读(203) 评论(0) 推荐(0) 编辑
摘要:Aggregations —— Metrics aggregations(度量聚合) https://www.elastic.co/guide/en/elasticsearch/reference/8.8/search-aggregations-metrics.html#search-aggrega 阅读全文
posted @ 2023-06-15 09:20 左扬 阅读(56) 评论(0) 推荐(0) 编辑
摘要:Aggregations —— Bucket aggregations(桶聚合) https://www.elastic.co/guide/en/elasticsearch/reference/8.8/search-aggregations-bucket.html#search-aggregatio 阅读全文
posted @ 2023-06-14 17:30 左扬 阅读(71) 评论(0) 推荐(0) 编辑
摘要:Aggregations [ˌægrɪˈgeʃən](聚合) https://www.elastic.co/guide/en/elasticsearch/reference/8.8/search-aggregations.html#search-aggregations An aggregation 阅读全文
posted @ 2023-06-14 10:57 左扬 阅读(258) 评论(0) 推荐(0) 编辑
摘要:REST APIs —— Document APIs —— Multi term vectors API https://www.elastic.co/guide/en/elasticsearch/reference/8.8/docs-multi-termvectors.html Retrieves 阅读全文
posted @ 2023-06-13 16:10 左扬 阅读(12) 评论(0) 推荐(0) 编辑
摘要:REST APIs —— Document APIs —— Term vectors API(向量API) https://www.elastic.co/guide/en/elasticsearch/reference/8.8/docs-termvectors.html#docs-termvecto 阅读全文
posted @ 2023-06-09 15:41 左扬 阅读(96) 评论(0) 推荐(0) 编辑
摘要:REST APIs —— Document APIs —— Bulk API https://www.elastic.co/guide/en/elasticsearch/reference/8.8/docs-bulk.html#docs-bulk Performs multiple indexing 阅读全文
posted @ 2023-06-09 14:26 左扬 阅读(209) 评论(0) 推荐(0) 编辑
摘要:Reindex from remote(跨集群索引) https://www.elastic.co/guide/en/elasticsearch/reference/8.8/docs-reindex.html#reindex-from-remote Reindex supports reindexi 阅读全文
posted @ 2023-06-09 14:24 左扬 阅读(120) 评论(0) 推荐(0) 编辑
摘要:REST APIs —— Document APIs —— Reindex API https://www.elastic.co/guide/en/elasticsearch/reference/8.8/docs-reindex.html#docs-reindex Copies documents 阅读全文
posted @ 2023-06-08 11:24 左扬 阅读(225) 评论(0) 推荐(0) 编辑
摘要:REST APIs —— Document APIs —— Multi get (mget) API https://www.elastic.co/guide/en/elasticsearch/reference/8.8/docs-multi-get.html#docs-multi-get Retr 阅读全文
posted @ 2023-06-07 15:07 左扬 阅读(53) 评论(0) 推荐(0) 编辑
摘要:REST APIs —— Document APIs —— Update By Query API https://www.elastic.co/guide/en/elasticsearch/reference/8.8/docs-update-by-query.html#docs-update-by 阅读全文
posted @ 2023-06-06 15:46 左扬 阅读(498) 评论(0) 推荐(0) 编辑
摘要:REST APIs —— Document APIs —— Update API 更新 API(_update) 允许根据提供的脚本更新文件。该操作从索引中获取文档,运行脚本(使用可选的脚本语言和参数),并对结果进行索引(还允许删除或忽略该操作)。它使用版本控制来确保在 Get 和 Reindex 阅读全文
posted @ 2023-06-06 13:37 左扬 阅读(153) 评论(0) 推荐(0) 编辑
摘要:REST APIs —— Document APIs —— Delete by query API https://www.elastic.co/guide/en/elasticsearch/reference/8.8/docs-delete-by-query.html Deletes docume 阅读全文
posted @ 2023-06-02 17:11 左扬 阅读(279) 评论(0) 推荐(0) 编辑
摘要:REST APIs —— Document APIs —— Delete API Removes a JSON document from the specified index. 从指定的索引中移除 JSON 文档。 1、Request(请求) https://www.elastic.co/gui 阅读全文
posted @ 2023-06-02 16:34 左扬 阅读(32) 评论(0) 推荐(0) 编辑
摘要:REST APIs —— Document APIs —— GET API https://www.elastic.co/guide/en/elasticsearch/reference/8.8/docs-get.html#docs-get Retrieves the specified JSON 阅读全文
posted @ 2023-06-02 15:00 左扬 阅读(43) 评论(0) 推荐(0) 编辑

levels of contents
点击右上角即可分享
微信分享提示