APIService

APIService 表示特定 GroupVersion 的伺服器。

apiVersion: apiregistration.k8s.io/v1

import "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1"

APIService

APIService 表示特定 GroupVersion 的伺服器。名稱必須為 "version.group"。


APIServiceSpec

APIServiceSpec 包含用於查詢和與伺服器通訊的資訊。只支援 HTTPS,但你可以停用證書驗證。


  • groupPriorityMinimum (int32), 必需

    GroupPriorityMinimum 是此組應至少具有的優先順序。優先順序越高,表示客戶端越傾向於選擇此組而不是優先順序較低的組。請注意,此組的其他版本可能會指定更高的 GroupPriorityMinimum 值,從而使整個組獲得更高的優先順序。主要排序基於 GroupPriorityMinimum,按從高到低排序(20 在 10 之前)。次要排序基於物件名稱的字母比較。(v1.bar 在 v1.foo 之前)我們建議如下:*.k8s.io(extensions 除外)為 18000,PaaS(OpenShift、Deis)建議在 2000 左右。

  • versionPriority (int32), 必需

    VersionPriority 控制此 API 版本在其組內的排序。必須大於零。主要排序基於 VersionPriority,按從高到低排序(20 在 10 之前)。由於它在一個組內,因此數字可以很小,可能在 10 左右。如果版本優先順序相等,則版本字串將用於計算組內的順序。如果版本字串是“kube-like”的,它將排在非“kube-like”版本字串之前,後者按字典順序排序。“Kube-like”版本以“v”開頭,後跟一個數字(主版本),然後可選地是字串“alpha”或“beta”和另一個數字(次版本)。這些版本首先按 GA > beta > alpha 排序(其中 GA 是沒有 beta 或 alpha 等字尾的版本),然後按主版本比較,再按次版本比較。版本排序示例列表:v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10。

  • caBundle ([]byte)

    原子性:在合併期間將被替換

    CABundle 是 PEM 編碼的 CA 捆綁包,將用於驗證 API 伺服器的服務證書。如果未指定,則使用 API 伺服器上的系統信任根。

  • group (string)

    Group 是此伺服器託管的 API 組名稱

  • insecureSkipTLSVerify (boolean)

    InsecureSkipTLSVerify 在與此伺服器通訊時停用 TLS 證書驗證。強烈不建議這樣做。您應該改用 CABundle。

  • service (ServiceReference)

    Service 是對此 API 伺服器服務的引用。它必須透過埠 443 進行通訊。如果 Service 為 nil,則表示 API 組版本的處理在此伺服器上本地處理。呼叫將簡單地委託給正常的處理程式鏈以完成。

    ServiceReference 包含對 Service.legacy.k8s.io 的引用

    • service.name (string)

      Name 是服務的名稱

    • service.namespace (string)

      Namespace 是服務的名稱空間

    • service.port (int32)

      如果指定,則為託管 webhook 的服務埠。為向後相容,預設為 443。`port` 應為有效的埠號(包括 1-65535)。

  • version (string)

    Version 是此伺服器託管的 API 版本。例如,“v1”

APIServiceStatus

APIServiceStatus 包含有關 API 伺服器的派生資訊


  • conditions ([]APIServiceCondition)

    補丁策略:按鍵 type 合併

    對映:合併時將保留鍵型別上的唯一值

    apiService 的當前服務狀態。

    APIServiceCondition 描述了 APIService 在特定時間點的狀態

    • conditions.status (string),必需

      Status 是條件的狀態。可以是 True、False、Unknown。

    • conditions.type (string),必需

      Type 是條件的型別。

    • conditions.lastTransitionTime (Time)

      條件上次從一種狀態轉換到另一種狀態的時間。

      Time 是 time.Time 的一個包裝器,支援正確地編組到 YAML 和 JSON。提供了 time 包提供的許多工廠方法的包裝器。

    • conditions.message (string)

      人類可讀的訊息,指示上次轉換的詳細資訊。

    • conditions.reason (string)

      條件上次轉換的唯一、單字、駝峰式原因。

APIServiceList

APIServiceList 是 APIService 物件的列表。


操作


get 讀取指定的 APIService

HTTP 請求

GET /apis/apiregistration.k8s.io/v1/apiservices/{name}

引數

  • name (在路徑中): string,必填

    APIService 的名稱

  • pretty (在查詢中): string

    pretty

響應

200 (APIService): OK

401: 未授權

get 讀取指定的 APIService 的狀態

HTTP 請求

GET /apis/apiregistration.k8s.io/v1/apiservices/{name}/status

引數

  • name (在路徑中): string,必填

    APIService 的名稱

  • pretty (在查詢中): string

    pretty

響應

200 (APIService): OK

401: 未授權

list 列出或監視型別為 APIService 的物件

HTTP 請求

GET /apis/apiregistration.k8s.io/v1/apiservices

引數

響應

200 (APIServiceList): OK

401: 未授權

create 建立一個 APIService

HTTP 請求

POST /apis/apiregistration.k8s.io/v1/apiservices

引數

響應

200 (APIService): OK

201 (APIService): 已建立

202 (APIService): 已接受

401: 未授權

update 替換指定的 APIService

HTTP 請求

PUT /apis/apiregistration.k8s.io/v1/apiservices/{name}

引數

  • name (在路徑中): string,必填

    APIService 的名稱

  • body: APIService, 必需

  • dryRun (在查詢中): string

    dryRun

  • fieldManager (在查詢中): string

    fieldManager

  • fieldValidation (在查詢中): string

    fieldValidation

  • pretty (在查詢中): string

    pretty

響應

200 (APIService): OK

201 (APIService): 已建立

401: 未授權

update 替換指定的 APIService 的狀態

HTTP 請求

PUT /apis/apiregistration.k8s.io/v1/apiservices/{name}/status

引數

  • name (在路徑中): string,必填

    APIService 的名稱

  • body: APIService, 必需

  • dryRun (在查詢中): string

    dryRun

  • fieldManager (在查詢中): string

    fieldManager

  • fieldValidation (在查詢中): string

    fieldValidation

  • pretty (在查詢中): string

    pretty

響應

200 (APIService): OK

201 (APIService): 已建立

401: 未授權

patch 部分更新指定的 APIService

HTTP 請求

PATCH /apis/apiregistration.k8s.io/v1/apiservices/{name}

引數

  • name (在路徑中): string,必填

    APIService 的名稱

  • body: Patch,必需

  • dryRun (在查詢中): string

    dryRun

  • fieldManager (在查詢中): string

    fieldManager

  • fieldValidation (在查詢中): string

    fieldValidation

  • force (在查詢中): boolean

    force

  • pretty (在查詢中): string

    pretty

響應

200 (APIService): OK

201 (APIService): 已建立

401: 未授權

patch 部分更新指定的 APIService 的狀態

HTTP 請求

PATCH /apis/apiregistration.k8s.io/v1/apiservices/{name}/status

引數

  • name (在路徑中): string,必填

    APIService 的名稱

  • body: Patch,必需

  • dryRun (在查詢中): string

    dryRun

  • fieldManager (在查詢中): string

    fieldManager

  • fieldValidation (在查詢中): string

    fieldValidation

  • force (在查詢中): boolean

    force

  • pretty (在查詢中): string

    pretty

響應

200 (APIService): OK

201 (APIService): 已建立

401: 未授權

delete 刪除一個 APIService

HTTP 請求

DELETE /apis/apiregistration.k8s.io/v1/apiservices/{name}

引數

響應

200 (Status): OK

202 (Status): 已接受

401: 未授權

deletecollection 刪除 APIService 集合

HTTP 請求

DELETE /apis/apiregistration.k8s.io/v1/apiservices

引數

響應

200 (Status): OK

401: 未授權

本頁面是自動生成的。

如果你打算報告此頁面存在的問題,請在問題描述中提及此頁面是自動生成的。修復可能需要在 Kubernetes 專案的其他地方進行。

上次修改時間:2025 年 4 月 9 日太平洋標準時間下午 6:36:更新 v1.32 的 API 參考文件 (a3b579d035)