|
| 1 | +--- |
| 2 | +api_metadata: |
| 3 | + apiVersion: "v1" |
| 4 | + import: "k8s.io/api/core/v1" |
| 5 | + kind: "Binding" |
| 6 | +content_type: "api_reference" |
| 7 | +description: "Binding 将一个对象与另一个对象联系起来; 例如,一个 Pod 被调度程序绑定到一个节点。" |
| 8 | +title: "Binding" |
| 9 | +weight: 9 |
| 10 | +auto_generated: true |
| 11 | +--- |
| 12 | + |
| 13 | +`apiVersion: v1` |
| 14 | + |
| 15 | +`import "k8s.io/api/core/v1"` |
| 16 | + |
| 17 | + |
| 18 | +## Binding {#Binding} |
| 19 | +<!-- |
| 20 | +Binding ties one object to another; for example, a pod is bound to a node by a scheduler. Deprecated in 1.7, please use the bindings subresource of pods instead. |
| 21 | +--> |
| 22 | +Binding 将一个对象与另一个对象联系起来; 例如,一个 Pod 被调度程序绑定到一个节点。 |
| 23 | +已在 1.7 版本弃用,请使用 Pod 的 binding 子资源。 |
| 24 | +<hr> |
| 25 | + |
| 26 | +- **apiVersion**: v1 |
| 27 | + |
| 28 | + |
| 29 | +- **kind**: Binding |
| 30 | + |
| 31 | + |
| 32 | +- **metadata** (<a href="{{< ref "../common-definitions/object-meta#ObjectMeta" >}}">ObjectMeta</a>) |
| 33 | +<!-- |
| 34 | + Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata |
| 35 | +--> |
| 36 | + 标准对象的元数据, 更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata |
| 37 | + |
| 38 | +<!-- |
| 39 | +- **target** (<a href="{{< ref "../common-definitions/object-reference#ObjectReference" >}}">ObjectReference</a>), required |
| 40 | +
|
| 41 | + The target object that you want to bind to the standard object. |
| 42 | +--> |
| 43 | + |
| 44 | +- **target** (<a href="{{< ref "../common-definitions/object-reference#ObjectReference" >}}">ObjectReference</a>), 必需 |
| 45 | + |
| 46 | + 要绑定到标准对象的目标对象。 |
| 47 | +<!-- |
| 48 | +## Operations {#Operations} |
| 49 | +--> |
| 50 | +## 操作 {#operations} |
| 51 | + |
| 52 | +<hr> |
| 53 | + |
| 54 | +<!-- |
| 55 | +### `create` create a Binding |
| 56 | +
|
| 57 | +#### HTTP Request |
| 58 | +
|
| 59 | +POST /api/v1/namespaces/{namespace}/bindings |
| 60 | +
|
| 61 | +#### Parameters |
| 62 | +--> |
| 63 | +### `create` 创建一个 Binding |
| 64 | + |
| 65 | +#### HTTP 请求 |
| 66 | + |
| 67 | +POST /api/v1/namespaces/{namespace}/bindings |
| 68 | + |
| 69 | +#### 参数 |
| 70 | + |
| 71 | +<!-- |
| 72 | +- **namespace** (*in path*): string, required |
| 73 | +
|
| 74 | + <a href="{{< ref "../common-parameters/common-parameters#namespace" >}}">namespace</a> |
| 75 | +
|
| 76 | +
|
| 77 | +- **body**: <a href="{{< ref "../cluster-resources/binding-v1#Binding" >}}">Binding</a>, required |
| 78 | +--> |
| 79 | +- **namespace** (**路径参数**): string, 必需 |
| 80 | + |
| 81 | + <a href="{{< ref "../common-parameters/common-parameters#namespace" >}}">namespace</a> |
| 82 | + |
| 83 | + |
| 84 | +- **body**: <a href="{{< ref "../cluster-resources/binding-v1#Binding" >}}">Binding</a>, 必需 |
| 85 | + |
| 86 | +<!-- |
| 87 | +- **dryRun** (*in query*): string |
| 88 | +
|
| 89 | + <a href="{{< ref "../common-parameters/common-parameters#dryRun" >}}">dryRun</a> |
| 90 | +
|
| 91 | +
|
| 92 | +- **fieldManager** (*in query*): string |
| 93 | +
|
| 94 | + <a href="{{< ref "../common-parameters/common-parameters#fieldManager" >}}">fieldManager</a> |
| 95 | +
|
| 96 | +--> |
| 97 | +- **dryRun** (**查询参数**): string |
| 98 | + |
| 99 | + <a href="{{< ref "../common-parameters/common-parameters#dryRun" >}}">dryRun</a> |
| 100 | + |
| 101 | + |
| 102 | +- **fieldManager** (**查询参数**): string |
| 103 | + |
| 104 | + <a href="{{< ref "../common-parameters/common-parameters#fieldManager" >}}">fieldManager</a> |
| 105 | + |
| 106 | + |
| 107 | +<!-- |
| 108 | +- **fieldValidation** (*in query*): string |
| 109 | +
|
| 110 | + <a href="{{< ref "../common-parameters/common-parameters#fieldValidation" >}}">fieldValidation</a> |
| 111 | +
|
| 112 | +
|
| 113 | +- **pretty** (*in query*): string |
| 114 | +
|
| 115 | + <a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty</a> |
| 116 | +--> |
| 117 | + |
| 118 | +- **fieldValidation** (**查询参数**): string |
| 119 | + |
| 120 | + <a href="{{< ref "../common-parameters/common-parameters#fieldValidation" >}}">fieldValidation</a> |
| 121 | + |
| 122 | + |
| 123 | +- **pretty** (**查询参数**): string |
| 124 | + |
| 125 | + <a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty</a> |
| 126 | + |
| 127 | +<!-- |
| 128 | +#### Response |
| 129 | +--> |
| 130 | +#### 响应 |
| 131 | + |
| 132 | +200 (<a href="{{< ref "../cluster-resources/binding-v1#Binding" >}}">Binding</a>): OK |
| 133 | + |
| 134 | +201 (<a href="{{< ref "../cluster-resources/binding-v1#Binding" >}}">Binding</a>): Created |
| 135 | + |
| 136 | +202 (<a href="{{< ref "../cluster-resources/binding-v1#Binding" >}}">Binding</a>): Accepted |
| 137 | + |
| 138 | +401: Unauthorized |
| 139 | + |
| 140 | +<!-- |
| 141 | +### `create` create binding of a Pod |
| 142 | +
|
| 143 | +#### HTTP Request |
| 144 | +
|
| 145 | +POST /api/v1/namespaces/{namespace}/pods/{name}/binding |
| 146 | +--> |
| 147 | +### `create` 创建 Pod 的绑定 |
| 148 | + |
| 149 | +#### HTTP 请求 |
| 150 | + |
| 151 | +POST /api/v1/namespaces/{namespace}/pods/{name}/binding |
| 152 | +<!-- |
| 153 | +#### Parameters |
| 154 | +
|
| 155 | +
|
| 156 | +- **name** (*in path*): string, required |
| 157 | +
|
| 158 | + name of the Binding |
| 159 | +
|
| 160 | +
|
| 161 | +- **namespace** (*in path*): string, required |
| 162 | +
|
| 163 | + <a href="{{< ref "../common-parameters/common-parameters#namespace" >}}">namespace</a> |
| 164 | +
|
| 165 | +
|
| 166 | +- **body**: <a href="{{< ref "../cluster-resources/binding-v1#Binding" >}}">Binding</a>, required |
| 167 | +--> |
| 168 | +#### 参数 |
| 169 | + |
| 170 | +- **name** (**路径参数**): string, 必需 |
| 171 | + |
| 172 | + Binding 的名称 |
| 173 | + |
| 174 | +- **namespace** (**路径参数**): string, 必需 |
| 175 | + |
| 176 | + <a href="{{< ref "../common-parameters/common-parameters#namespace" >}}">namespace</a> |
| 177 | + |
| 178 | +- **body**: <a href="{{< ref "../cluster-resources/binding-v1#Binding" >}}">Binding</a>, 必需 |
| 179 | + |
| 180 | +<!-- |
| 181 | +- **dryRun** (*in query*): string |
| 182 | +
|
| 183 | + <a href="{{< ref "../common-parameters/common-parameters#dryRun" >}}">dryRun</a> |
| 184 | +
|
| 185 | +- **fieldManager** (*in query*): string |
| 186 | +
|
| 187 | + <a href="{{< ref "../common-parameters/common-parameters#fieldManager" >}}">fieldManager</a> |
| 188 | +
|
| 189 | +- **fieldValidation** (*in query*): string |
| 190 | +
|
| 191 | + <a href="{{< ref "../common-parameters/common-parameters#fieldValidation" >}}">fieldValidation</a> |
| 192 | +
|
| 193 | +- **pretty** (*in query*): string |
| 194 | +
|
| 195 | + <a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty</a> |
| 196 | +--> |
| 197 | +- **dryRun** (**查询参数**): string |
| 198 | + |
| 199 | + <a href="{{< ref "../common-parameters/common-parameters#dryRun" >}}">dryRun</a> |
| 200 | + |
| 201 | + |
| 202 | +- **fieldManager** (**查询参数**): string |
| 203 | + |
| 204 | + <a href="{{< ref "../common-parameters/common-parameters#fieldManager" >}}">fieldManager</a> |
| 205 | + |
| 206 | +- **fieldValidation** (**查询参数**): string |
| 207 | + |
| 208 | + <a href="{{< ref "../common-parameters/common-parameters#fieldValidation" >}}">fieldValidation</a> |
| 209 | + |
| 210 | +- **pretty** (**查询参数**): string |
| 211 | + |
| 212 | + <a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty</a> |
| 213 | + |
| 214 | +#### 响应 |
| 215 | + |
| 216 | +200 (<a href="{{< ref "../cluster-resources/binding-v1#Binding" >}}">Binding</a>): OK |
| 217 | + |
| 218 | +201 (<a href="{{< ref "../cluster-resources/binding-v1#Binding" >}}">Binding</a>): Created |
| 219 | + |
| 220 | +202 (<a href="{{< ref "../cluster-resources/binding-v1#Binding" >}}">Binding</a>): Accepted |
| 221 | + |
| 222 | +401: Unauthorized |
0 commit comments