blob: 529e2cdc134a3c3725c0707d1952cb27360c289f [file] [log] [blame]
Takashi Matsuo06694102015-09-11 13:55:40 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="container_v1.html">Google Container Engine API</a> . <a href="container_v1.projects.html">projects</a> . <a href="container_v1.projects.zones.html">zones</a> . <a href="container_v1.projects.zones.clusters.html">clusters</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#create">create(projectId, zone, body, x__xgafv=None)</a></code></p>
79<p class="firstline">Creates a cluster, consisting of the specified number and type of Google Compute Engine instances, plus a Kubernetes master endpoint. By default, the cluster is created in the project's [default network](/compute/docs/networking#networks_1). One firewall is added for the cluster. After cluster creation, the cluster creates routes for each node to allow the containers on that node to communicate with all other instances in the cluster. Finally, an entry is added to the project's global metadata indicating which CIDR range is being used by the cluster.</p>
80<p class="toc_element">
81 <code><a href="#delete">delete(projectId, zone, clusterId, x__xgafv=None)</a></code></p>
82<p class="firstline">Deletes the cluster, including the Kubernetes endpoint and all worker nodes. Firewalls and routes that were configured during cluster creation are also deleted.</p>
83<p class="toc_element">
84 <code><a href="#get">get(projectId, zone, clusterId, x__xgafv=None)</a></code></p>
85<p class="firstline">Gets a specific cluster.</p>
86<p class="toc_element">
87 <code><a href="#list">list(projectId, zone, x__xgafv=None)</a></code></p>
88<p class="firstline">Lists all clusters owned by a project in either the specified zone or all zones.</p>
89<p class="toc_element">
90 <code><a href="#update">update(projectId, zone, clusterId, body, x__xgafv=None)</a></code></p>
91<p class="firstline">Update settings of a specific cluster.</p>
92<h3>Method Details</h3>
93<div class="method">
94 <code class="details" id="create">create(projectId, zone, body, x__xgafv=None)</code>
95 <pre>Creates a cluster, consisting of the specified number and type of Google Compute Engine instances, plus a Kubernetes master endpoint. By default, the cluster is created in the project's [default network](/compute/docs/networking#networks_1). One firewall is added for the cluster. After cluster creation, the cluster creates routes for each node to allow the containers on that node to communicate with all other instances in the cluster. Finally, an entry is added to the project's global metadata indicating which CIDR range is being used by the cluster.
96
97Args:
98 projectId: string, The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). (required)
99 zone: string, The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. (required)
100 body: object, The request body. (required)
101 The object takes the form of:
102
103{ # CreateClusterRequest creates a cluster.
104 "cluster": { # A Google Container Engine cluster. # A [cluster resource](/container-engine/reference/rest/v1/projects.zones.clusters)
105 "status": "A String", # [Output only] The current status of this cluster.
106 "nodeIpv4CidrSize": 42, # [Output only] The size of the address space on each node for hosting containers. This is provisioned from within the container_ipv4_cidr range.
107 "statusMessage": "A String", # [Output only] Additional information about the current status of this cluster, if available.
108 "endpoint": "A String", # [Output only] The IP address of this cluster's Kubernetes master endpoint. The endpoint can be accessed from the internet at `https://username:password@endpoint/`. See the `masterAuth` property of this resource for username and password information.
109 "name": "A String", # The name of this cluster. The name must be unique within this project and zone, and can be up to 40 characters with the following restrictions: * Lowercase letters, numbers, and hyphens only. * Must start with a letter. * Must end with a number or a letter.
110 "loggingService": "A String", # The logging service that the cluster should write logs to. Currently available options: * "logging.googleapis.com" - the Google Cloud Logging service * "none" - no logs will be exported from the cluster * "" - default value; the default is "logging.googleapis.com"
111 "currentNodeVersion": "A String", # [Output only] The current version of the node software components. If they are currently at different versions because they're in the process of being upgraded, this reflects the minimum version of any of them.
112 "instanceGroupUrls": [ # [Output only] The resource URLs of [instance groups](/compute/docs/instance-groups/) associated with this cluster.
113 "A String",
114 ],
115 "currentMasterVersion": "A String", # [Output only] The current software version of the master endpoint.
116 "servicesIpv4Cidr": "A String", # [Output only] The IP address range of the Kubernetes services in this cluster, in [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation (e.g. `1.2.3.4/29`). Service addresses are typically put in the last /16 from the container CIDR.
117 "masterAuth": { # The authentication information for accessing the master endpoint. Authentication can be done using HTTP basic auth or using client certificates. # The authentication information for accessing the master.
118 "username": "A String", # The username to use for HTTP basic authentication when accessing the Kubernetes master endpoint.
119 "password": "A String", # The password to use for HTTP basic authentication when accessing the Kubernetes master endpoint. Because the master endpoint is open to the internet, you should create a strong password.
120 "clientKey": "A String", # [Output only] Base64 encoded private key used by clients to authenticate to the cluster endpoint.
121 "clientCertificate": "A String", # [Output only] Base64 encoded public certificate used by clients to authenticate to the cluster endpoint.
122 "clusterCaCertificate": "A String", # [Output only] Base64 encoded public certificate that is the root of trust for the cluster.
123 },
124 "network": "A String", # The name of the Google Compute Engine [network](/compute/docs/networking#networks_1) to which the cluster is connected. If left unspecified, the "default" network will be used.
125 "initialClusterVersion": "A String", # [Output only] The software version of Kubernetes master and kubelets used in the cluster when it was first created. The version can be upgraded over time.
126 "nodeConfig": { # Per-node parameters. # Parameters used in creating the cluster's nodes. See the descriptions of the child properties of `nodeConfig`. If unspecified, the defaults for all child properties are used.
127 "diskSizeGb": 42, # Size of the disk attached to each node, specified in GB. The smallest allowed disk size is 10GB. If unspecified, the default disk size is 100GB.
128 "machineType": "A String", # The name of a Google Compute Engine [machine type](/compute/docs/machine-types) (e.g. `n1-standard-1`). If unspecified, the default machine type is `n1-standard-1`.
129 "oauthScopes": [ # The set of Google API scopes to be made available on all of the node VMs under the "default" service account. The following scopes are recommended, but not required, and by default are not included: * `https://www.googleapis.com/auth/compute` is required for mounting persistent storage on your nodes. * `https://www.googleapis.com/auth/devstorage.read_only` is required for communicating with *gcr.io*. If unspecified, no scopes are added.
130 "A String",
131 ],
132 },
133 "initialNodeCount": 42, # The number of nodes to create in this cluster. You must ensure that your Compute Engine [resource quota](/compute/docs/resource-quotas) is sufficient for this number of instances. You must also have available firewall and routes quota.
134 "clusterIpv4Cidr": "A String", # The IP address range of the container pods in this cluster, in [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation (e.g. `10.96.0.0/14`). Leave blank to have one automatically chosen or specify a `/14` block in `10.0.0.0/8`.
135 "monitoringService": "A String", # The monitoring service that the cluster should write metrics to. Currently available options: * "monitoring.googleapis.com" - the Google Cloud Monitoring service * "none" - no metrics will be exported from the cluster * "" - default value; the default is "monitoring.googleapis.com"
136 "zone": "A String", # [Output only] The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides.
137 "createTime": "A String", # [Output only] The time the cluster was created, in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
138 "selfLink": "A String", # [Output only] Server-defined URL for the resource.
139 "description": "A String", # An optional description of this cluster.
140 },
141 }
142
143 x__xgafv: string, V1 error format.
144
145Returns:
146 An object of the form:
147
148 { # Defines the operation resource. All fields are output only.
149 "status": "A String", # The current status of the operation.
150 "name": "A String", # The server-assigned ID for the operation.
151 "zone": "A String", # The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the operation is taking place.
152 "statusMessage": "A String", # If an error has occurred, a textual description of the error.
153 "operationType": "A String", # The operation type.
154 "selfLink": "A String", # Server-defined URL for the resource.
155 "targetLink": "A String", # Server-defined URL for the target of the operation.
156 }</pre>
157</div>
158
159<div class="method">
160 <code class="details" id="delete">delete(projectId, zone, clusterId, x__xgafv=None)</code>
161 <pre>Deletes the cluster, including the Kubernetes endpoint and all worker nodes. Firewalls and routes that were configured during cluster creation are also deleted.
162
163Args:
164 projectId: string, The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). (required)
165 zone: string, The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. (required)
166 clusterId: string, The name of the cluster to delete. (required)
167 x__xgafv: string, V1 error format.
168
169Returns:
170 An object of the form:
171
172 { # Defines the operation resource. All fields are output only.
173 "status": "A String", # The current status of the operation.
174 "name": "A String", # The server-assigned ID for the operation.
175 "zone": "A String", # The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the operation is taking place.
176 "statusMessage": "A String", # If an error has occurred, a textual description of the error.
177 "operationType": "A String", # The operation type.
178 "selfLink": "A String", # Server-defined URL for the resource.
179 "targetLink": "A String", # Server-defined URL for the target of the operation.
180 }</pre>
181</div>
182
183<div class="method">
184 <code class="details" id="get">get(projectId, zone, clusterId, x__xgafv=None)</code>
185 <pre>Gets a specific cluster.
186
187Args:
188 projectId: string, The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). (required)
189 zone: string, The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. (required)
190 clusterId: string, The name of the cluster to retrieve. (required)
191 x__xgafv: string, V1 error format.
192
193Returns:
194 An object of the form:
195
196 { # A Google Container Engine cluster.
197 "status": "A String", # [Output only] The current status of this cluster.
198 "nodeIpv4CidrSize": 42, # [Output only] The size of the address space on each node for hosting containers. This is provisioned from within the container_ipv4_cidr range.
199 "statusMessage": "A String", # [Output only] Additional information about the current status of this cluster, if available.
200 "endpoint": "A String", # [Output only] The IP address of this cluster's Kubernetes master endpoint. The endpoint can be accessed from the internet at `https://username:password@endpoint/`. See the `masterAuth` property of this resource for username and password information.
201 "name": "A String", # The name of this cluster. The name must be unique within this project and zone, and can be up to 40 characters with the following restrictions: * Lowercase letters, numbers, and hyphens only. * Must start with a letter. * Must end with a number or a letter.
202 "loggingService": "A String", # The logging service that the cluster should write logs to. Currently available options: * "logging.googleapis.com" - the Google Cloud Logging service * "none" - no logs will be exported from the cluster * "" - default value; the default is "logging.googleapis.com"
203 "currentNodeVersion": "A String", # [Output only] The current version of the node software components. If they are currently at different versions because they're in the process of being upgraded, this reflects the minimum version of any of them.
204 "instanceGroupUrls": [ # [Output only] The resource URLs of [instance groups](/compute/docs/instance-groups/) associated with this cluster.
205 "A String",
206 ],
207 "currentMasterVersion": "A String", # [Output only] The current software version of the master endpoint.
208 "servicesIpv4Cidr": "A String", # [Output only] The IP address range of the Kubernetes services in this cluster, in [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation (e.g. `1.2.3.4/29`). Service addresses are typically put in the last /16 from the container CIDR.
209 "masterAuth": { # The authentication information for accessing the master endpoint. Authentication can be done using HTTP basic auth or using client certificates. # The authentication information for accessing the master.
210 "username": "A String", # The username to use for HTTP basic authentication when accessing the Kubernetes master endpoint.
211 "password": "A String", # The password to use for HTTP basic authentication when accessing the Kubernetes master endpoint. Because the master endpoint is open to the internet, you should create a strong password.
212 "clientKey": "A String", # [Output only] Base64 encoded private key used by clients to authenticate to the cluster endpoint.
213 "clientCertificate": "A String", # [Output only] Base64 encoded public certificate used by clients to authenticate to the cluster endpoint.
214 "clusterCaCertificate": "A String", # [Output only] Base64 encoded public certificate that is the root of trust for the cluster.
215 },
216 "network": "A String", # The name of the Google Compute Engine [network](/compute/docs/networking#networks_1) to which the cluster is connected. If left unspecified, the "default" network will be used.
217 "initialClusterVersion": "A String", # [Output only] The software version of Kubernetes master and kubelets used in the cluster when it was first created. The version can be upgraded over time.
218 "nodeConfig": { # Per-node parameters. # Parameters used in creating the cluster's nodes. See the descriptions of the child properties of `nodeConfig`. If unspecified, the defaults for all child properties are used.
219 "diskSizeGb": 42, # Size of the disk attached to each node, specified in GB. The smallest allowed disk size is 10GB. If unspecified, the default disk size is 100GB.
220 "machineType": "A String", # The name of a Google Compute Engine [machine type](/compute/docs/machine-types) (e.g. `n1-standard-1`). If unspecified, the default machine type is `n1-standard-1`.
221 "oauthScopes": [ # The set of Google API scopes to be made available on all of the node VMs under the "default" service account. The following scopes are recommended, but not required, and by default are not included: * `https://www.googleapis.com/auth/compute` is required for mounting persistent storage on your nodes. * `https://www.googleapis.com/auth/devstorage.read_only` is required for communicating with *gcr.io*. If unspecified, no scopes are added.
222 "A String",
223 ],
224 },
225 "initialNodeCount": 42, # The number of nodes to create in this cluster. You must ensure that your Compute Engine [resource quota](/compute/docs/resource-quotas) is sufficient for this number of instances. You must also have available firewall and routes quota.
226 "clusterIpv4Cidr": "A String", # The IP address range of the container pods in this cluster, in [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation (e.g. `10.96.0.0/14`). Leave blank to have one automatically chosen or specify a `/14` block in `10.0.0.0/8`.
227 "monitoringService": "A String", # The monitoring service that the cluster should write metrics to. Currently available options: * "monitoring.googleapis.com" - the Google Cloud Monitoring service * "none" - no metrics will be exported from the cluster * "" - default value; the default is "monitoring.googleapis.com"
228 "zone": "A String", # [Output only] The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides.
229 "createTime": "A String", # [Output only] The time the cluster was created, in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
230 "selfLink": "A String", # [Output only] Server-defined URL for the resource.
231 "description": "A String", # An optional description of this cluster.
232 }</pre>
233</div>
234
235<div class="method">
236 <code class="details" id="list">list(projectId, zone, x__xgafv=None)</code>
237 <pre>Lists all clusters owned by a project in either the specified zone or all zones.
238
239Args:
240 projectId: string, The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). (required)
241 zone: string, The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides, or "-" for all zones. (required)
242 x__xgafv: string, V1 error format.
243
244Returns:
245 An object of the form:
246
247 { # ListClustersResponse is the result of ListClustersRequest.
248 "clusters": [ # A list of clusters in the project in the specified zone, or across all ones.
249 { # A Google Container Engine cluster.
250 "status": "A String", # [Output only] The current status of this cluster.
251 "nodeIpv4CidrSize": 42, # [Output only] The size of the address space on each node for hosting containers. This is provisioned from within the container_ipv4_cidr range.
252 "statusMessage": "A String", # [Output only] Additional information about the current status of this cluster, if available.
253 "endpoint": "A String", # [Output only] The IP address of this cluster's Kubernetes master endpoint. The endpoint can be accessed from the internet at `https://username:password@endpoint/`. See the `masterAuth` property of this resource for username and password information.
254 "name": "A String", # The name of this cluster. The name must be unique within this project and zone, and can be up to 40 characters with the following restrictions: * Lowercase letters, numbers, and hyphens only. * Must start with a letter. * Must end with a number or a letter.
255 "loggingService": "A String", # The logging service that the cluster should write logs to. Currently available options: * "logging.googleapis.com" - the Google Cloud Logging service * "none" - no logs will be exported from the cluster * "" - default value; the default is "logging.googleapis.com"
256 "currentNodeVersion": "A String", # [Output only] The current version of the node software components. If they are currently at different versions because they're in the process of being upgraded, this reflects the minimum version of any of them.
257 "instanceGroupUrls": [ # [Output only] The resource URLs of [instance groups](/compute/docs/instance-groups/) associated with this cluster.
258 "A String",
259 ],
260 "currentMasterVersion": "A String", # [Output only] The current software version of the master endpoint.
261 "servicesIpv4Cidr": "A String", # [Output only] The IP address range of the Kubernetes services in this cluster, in [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation (e.g. `1.2.3.4/29`). Service addresses are typically put in the last /16 from the container CIDR.
262 "masterAuth": { # The authentication information for accessing the master endpoint. Authentication can be done using HTTP basic auth or using client certificates. # The authentication information for accessing the master.
263 "username": "A String", # The username to use for HTTP basic authentication when accessing the Kubernetes master endpoint.
264 "password": "A String", # The password to use for HTTP basic authentication when accessing the Kubernetes master endpoint. Because the master endpoint is open to the internet, you should create a strong password.
265 "clientKey": "A String", # [Output only] Base64 encoded private key used by clients to authenticate to the cluster endpoint.
266 "clientCertificate": "A String", # [Output only] Base64 encoded public certificate used by clients to authenticate to the cluster endpoint.
267 "clusterCaCertificate": "A String", # [Output only] Base64 encoded public certificate that is the root of trust for the cluster.
268 },
269 "network": "A String", # The name of the Google Compute Engine [network](/compute/docs/networking#networks_1) to which the cluster is connected. If left unspecified, the "default" network will be used.
270 "initialClusterVersion": "A String", # [Output only] The software version of Kubernetes master and kubelets used in the cluster when it was first created. The version can be upgraded over time.
271 "nodeConfig": { # Per-node parameters. # Parameters used in creating the cluster's nodes. See the descriptions of the child properties of `nodeConfig`. If unspecified, the defaults for all child properties are used.
272 "diskSizeGb": 42, # Size of the disk attached to each node, specified in GB. The smallest allowed disk size is 10GB. If unspecified, the default disk size is 100GB.
273 "machineType": "A String", # The name of a Google Compute Engine [machine type](/compute/docs/machine-types) (e.g. `n1-standard-1`). If unspecified, the default machine type is `n1-standard-1`.
274 "oauthScopes": [ # The set of Google API scopes to be made available on all of the node VMs under the "default" service account. The following scopes are recommended, but not required, and by default are not included: * `https://www.googleapis.com/auth/compute` is required for mounting persistent storage on your nodes. * `https://www.googleapis.com/auth/devstorage.read_only` is required for communicating with *gcr.io*. If unspecified, no scopes are added.
275 "A String",
276 ],
277 },
278 "initialNodeCount": 42, # The number of nodes to create in this cluster. You must ensure that your Compute Engine [resource quota](/compute/docs/resource-quotas) is sufficient for this number of instances. You must also have available firewall and routes quota.
279 "clusterIpv4Cidr": "A String", # The IP address range of the container pods in this cluster, in [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation (e.g. `10.96.0.0/14`). Leave blank to have one automatically chosen or specify a `/14` block in `10.0.0.0/8`.
280 "monitoringService": "A String", # The monitoring service that the cluster should write metrics to. Currently available options: * "monitoring.googleapis.com" - the Google Cloud Monitoring service * "none" - no metrics will be exported from the cluster * "" - default value; the default is "monitoring.googleapis.com"
281 "zone": "A String", # [Output only] The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides.
282 "createTime": "A String", # [Output only] The time the cluster was created, in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
283 "selfLink": "A String", # [Output only] Server-defined URL for the resource.
284 "description": "A String", # An optional description of this cluster.
285 },
286 ],
287 }</pre>
288</div>
289
290<div class="method">
291 <code class="details" id="update">update(projectId, zone, clusterId, body, x__xgafv=None)</code>
292 <pre>Update settings of a specific cluster.
293
294Args:
295 projectId: string, The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). (required)
296 zone: string, The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. (required)
297 clusterId: string, The name of the cluster to upgrade. (required)
298 body: object, The request body. (required)
299 The object takes the form of:
300
301{ # UpdateClusterRequest updates a cluster.
302 "update": { # ClusterUpdate describes an update to the cluster. # A description of the update.
303 "desiredNodeVersion": "A String", # The Kubernetes version to change the nodes to (typically an upgrade). Use "-" to upgrade to the latest version supported by the server.
304 },
305 }
306
307 x__xgafv: string, V1 error format.
308
309Returns:
310 An object of the form:
311
312 { # Defines the operation resource. All fields are output only.
313 "status": "A String", # The current status of the operation.
314 "name": "A String", # The server-assigned ID for the operation.
315 "zone": "A String", # The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the operation is taking place.
316 "statusMessage": "A String", # If an error has occurred, a textual description of the error.
317 "operationType": "A String", # The operation type.
318 "selfLink": "A String", # Server-defined URL for the resource.
319 "targetLink": "A String", # Server-defined URL for the target of the operation.
320 }</pre>
321</div>
322
323</body></html>