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