blob: 2a696bb2c69258e338fa1518338264017731087b [file] [log] [blame]
Craig Citroe633be12015-03-02 13:40:36 -08001<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_v1beta1.html">Google Container Engine API</a> . <a href="container_v1beta1.projects.html">projects</a> . <a href="container_v1beta1.projects.zones.html">zones</a> . <a href="container_v1beta1.projects.zones.clusters.html">clusters</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#create">create(projectId, zoneId, body)</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 instance.</p>
80<p class="toc_element">
81 <code><a href="#delete">delete(projectId, zoneId, clusterId)</a></code></p>
82<p class="firstline">Deletes the cluster, including the Kubernetes master and all worker nodes.</p>
83<p class="toc_element">
84 <code><a href="#get">get(projectId, zoneId, clusterId)</a></code></p>
85<p class="firstline">Gets a specific cluster.</p>
86<p class="toc_element">
87 <code><a href="#list">list(projectId, zoneId)</a></code></p>
88<p class="firstline">Lists all clusters owned by a project in the specified zone.</p>
89<h3>Method Details</h3>
90<div class="method">
91 <code class="details" id="create">create(projectId, zoneId, body)</code>
92 <pre>Creates a cluster, consisting of the specified number and type of Google Compute Engine instances, plus a Kubernetes master instance.
93
94The cluster is created in the project's default network.
95
96A firewall is added that allows traffic into port 443 on the master, which enables HTTPS. A firewall and a route is added for each node to allow the containers on that node to communicate with all other instances in the cluster.
97
Nathaniel Manista4f877e52015-06-15 16:44:50 +000098Finally, an entry is added to the project's global metadata indicating which CIDR range is being used by the cluster.
Craig Citroe633be12015-03-02 13:40:36 -080099
100Args:
101 projectId: string, The Google Developers Console project ID or project number. (required)
102 zoneId: string, The name of the Google Compute Engine zone in which the cluster resides. (required)
103 body: object, The request body. (required)
104 The object takes the form of:
105
106{
107 "cluster": { # A cluster resource.
108 "status": "A String", # [Output only] The current status of this cluster.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000109 "containerIpv4Cidr": "A String", # The IP address range of the container pods in this cluster, in CIDR 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 or 172.16.0.0/12.
Craig Citroe633be12015-03-02 13:40:36 -0800110 "description": "A String", # An optional description of this cluster.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000111 "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:
112 # - Lowercase letters, numbers, and hyphens only.
113 # - Must start with a letter.
114 # - Must end with a number or a letter.
Craig Citroe633be12015-03-02 13:40:36 -0800115 "numNodes": 42, # The number of nodes to create in this cluster. You must ensure that your Compute Engine resource quota is sufficient for this number of instances plus one (to include the master). You must also have available firewall and routes quota.
116 "nodeRoutingPrefixSize": 42, # [Output only] The size of the address space on each node for hosting containers.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000117 "instanceGroupUrls": [ # [Output only] The resource URLs of [instance groups](/compute/docs/instance-groups/) associated with this cluster.
118 "A String",
119 ],
120 "masterAuth": { # The authentication information for accessing the master. Authentication is either done using HTTP basic authentication or using a bearer token. # The authentication information for accessing the master.
121 "bearerToken": "A String", # The token used to authenticate API requests to the master. The token is to be included in an HTTP Authorization Header in all requests to the master endpoint. The format of the header is: "Authorization: Bearer ".
122 "clientKey": "A String", # [Output only] Base64 encoded private key used by clients to authenticate to the cluster endpoint.
123 "clientCertificate": "A String", # [Output only] Base64 encoded public certificate used by clients to authenticate to the cluster endpoint.
124 "user": "A String", # The username to use for HTTP basic authentication when accessing the Kubernetes master endpoint.
125 "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.
126 "clusterCaCertificate": "A String", # [Output only] Base64 encoded public certificate that is the root of trust for the cluster.
Craig Citroe633be12015-03-02 13:40:36 -0800127 },
128 "clusterApiVersion": "A String", # The API version of the Kubernetes master and kubelets running in this cluster. Leave blank to pick up the latest stable release, or specify a version of the form "x.y.z". The Google Container Engine release notes lists the currently supported versions. If an incorrect version is specified, the server returns an error listing the currently supported versions.
129 "network": "A String", # The name of the Google Compute Engine network to which the cluster is connected.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000130 "zone": "A String", # [Output only] The name of the Google Compute Engine zone in which the cluster resides.
131 "endpoint": "A String", # [Output only] The IP address of this cluster's Kubernetes master. The endpoint can be accessed from the internet at https://username:password@endpoint/.
132 #
133 # See the masterAuth property of this resource for username and password information.
Craig Citroe633be12015-03-02 13:40:36 -0800134 "nodeConfig": { # The machine type and image to use for all nodes in this cluster. See the descriptions of the child properties of nodeConfig.
135 "serviceAccounts": [ # The optional list of ServiceAccounts, each with their specified scopes, to be made available on all of the node VMs. In addition to the service accounts and scopes specified, the "default" account will always be created with the following scopes to ensure the correct functioning of the cluster:
136 # - https://www.googleapis.com/auth/compute,
137 # - https://www.googleapis.com/auth/devstorage.read_only
138 { # A Compute Engine service account.
139 "scopes": [ # The list of scopes to be made available for this service account.
140 "A String",
141 ],
142 "email": "A String", # Email address of the service account.
143 },
144 ],
145 "machineType": "A String", # The name of a Google Compute Engine machine type (e.g. n1-standard-1).
146 #
147 # If unspecified, the default machine type is n1-standard-1.
148 "sourceImage": "A String", # The fully-specified name of a Google Compute Engine image. For example: https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/backports-debian-7-wheezy-vYYYYMMDD (where YYYMMDD is the version date).
149 #
150 # If specifying an image, you are responsible for ensuring its compatibility with the Debian 7 backports image. We recommend leaving this field blank to accept the default backports-debian-7-wheezy value.
151 },
152 "statusMessage": "A String", # [Output only] Additional information about the current status of this cluster, if available.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000153 "servicesIpv4Cidr": "A String", # [Output only] The IP address range of the Kubernetes services in this cluster, in CIDR notation (e.g. 1.2.3.4/29). Service addresses are typically put in the last /16 from the container CIDR.
Craig Citroe633be12015-03-02 13:40:36 -0800154 "creationTimestamp": "A String", # [Output only] The time the cluster was created, in RFC3339 text format.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000155 "enableCloudLogging": True or False, # Whether logs from the cluster should be made available via the Google Cloud Logging service. This includes both logs from your applications running in the cluster as well as logs from the Kubernetes components themselves.
Craig Citroe633be12015-03-02 13:40:36 -0800156 "selfLink": "A String", # [Output only] Server-defined URL for the resource.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000157 "enableCloudMonitoring": True or False, # Whether metrics from the cluster should be made available via the Google Cloud Monitoring service.
Craig Citroe633be12015-03-02 13:40:36 -0800158 },
159 }
160
161
162Returns:
163 An object of the form:
164
165 { # Defines the operation resource. All fields are output only.
166 "status": "A String", # The current status of the operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000167 "name": "A String", # The server-assigned ID for the operation.
Craig Citroe633be12015-03-02 13:40:36 -0800168 "zone": "A String", # The name of the Google Compute Engine zone in which the operation is taking place.
169 "errorMessage": "A String", # If an error has occurred, a textual description of the error.
170 "targetLink": "A String", # Server-defined URL for the target of the operation.
171 "operationType": "A String", # The operation type.
172 "selfLink": "A String", # Server-defined URL for the resource.
173 "target": "A String", # [Optional] The URL of the cluster resource that this operation is associated with.
174 }</pre>
175</div>
176
177<div class="method">
178 <code class="details" id="delete">delete(projectId, zoneId, clusterId)</code>
179 <pre>Deletes the cluster, including the Kubernetes master and all worker nodes.
180
181Firewalls and routes that were configured at cluster creation are also deleted.
182
183Args:
184 projectId: string, The Google Developers Console project ID or project number. (required)
185 zoneId: string, The name of the Google Compute Engine zone in which the cluster resides. (required)
186 clusterId: string, The name of the cluster to delete. (required)
187
188Returns:
189 An object of the form:
190
191 { # Defines the operation resource. All fields are output only.
192 "status": "A String", # The current status of the operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000193 "name": "A String", # The server-assigned ID for the operation.
Craig Citroe633be12015-03-02 13:40:36 -0800194 "zone": "A String", # The name of the Google Compute Engine zone in which the operation is taking place.
195 "errorMessage": "A String", # If an error has occurred, a textual description of the error.
196 "targetLink": "A String", # Server-defined URL for the target of the operation.
197 "operationType": "A String", # The operation type.
198 "selfLink": "A String", # Server-defined URL for the resource.
199 "target": "A String", # [Optional] The URL of the cluster resource that this operation is associated with.
200 }</pre>
201</div>
202
203<div class="method">
204 <code class="details" id="get">get(projectId, zoneId, clusterId)</code>
205 <pre>Gets a specific cluster.
206
207Args:
208 projectId: string, The Google Developers Console project ID or project number. (required)
209 zoneId: string, The name of the Google Compute Engine zone in which the cluster resides. (required)
210 clusterId: string, The name of the cluster to retrieve. (required)
211
212Returns:
213 An object of the form:
214
215 {
216 "status": "A String", # [Output only] The current status of this cluster.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000217 "containerIpv4Cidr": "A String", # The IP address range of the container pods in this cluster, in CIDR 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 or 172.16.0.0/12.
Craig Citroe633be12015-03-02 13:40:36 -0800218 "description": "A String", # An optional description of this cluster.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000219 "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:
220 # - Lowercase letters, numbers, and hyphens only.
221 # - Must start with a letter.
222 # - Must end with a number or a letter.
Craig Citroe633be12015-03-02 13:40:36 -0800223 "numNodes": 42, # The number of nodes to create in this cluster. You must ensure that your Compute Engine resource quota is sufficient for this number of instances plus one (to include the master). You must also have available firewall and routes quota.
224 "nodeRoutingPrefixSize": 42, # [Output only] The size of the address space on each node for hosting containers.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000225 "instanceGroupUrls": [ # [Output only] The resource URLs of [instance groups](/compute/docs/instance-groups/) associated with this cluster.
226 "A String",
227 ],
228 "masterAuth": { # The authentication information for accessing the master. Authentication is either done using HTTP basic authentication or using a bearer token. # The authentication information for accessing the master.
229 "bearerToken": "A String", # The token used to authenticate API requests to the master. The token is to be included in an HTTP Authorization Header in all requests to the master endpoint. The format of the header is: "Authorization: Bearer ".
230 "clientKey": "A String", # [Output only] Base64 encoded private key used by clients to authenticate to the cluster endpoint.
231 "clientCertificate": "A String", # [Output only] Base64 encoded public certificate used by clients to authenticate to the cluster endpoint.
232 "user": "A String", # The username to use for HTTP basic authentication when accessing the Kubernetes master endpoint.
233 "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.
234 "clusterCaCertificate": "A String", # [Output only] Base64 encoded public certificate that is the root of trust for the cluster.
Craig Citroe633be12015-03-02 13:40:36 -0800235 },
236 "clusterApiVersion": "A String", # The API version of the Kubernetes master and kubelets running in this cluster. Leave blank to pick up the latest stable release, or specify a version of the form "x.y.z". The Google Container Engine release notes lists the currently supported versions. If an incorrect version is specified, the server returns an error listing the currently supported versions.
237 "network": "A String", # The name of the Google Compute Engine network to which the cluster is connected.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000238 "zone": "A String", # [Output only] The name of the Google Compute Engine zone in which the cluster resides.
239 "endpoint": "A String", # [Output only] The IP address of this cluster's Kubernetes master. The endpoint can be accessed from the internet at https://username:password@endpoint/.
240 #
241 # See the masterAuth property of this resource for username and password information.
Craig Citroe633be12015-03-02 13:40:36 -0800242 "nodeConfig": { # The machine type and image to use for all nodes in this cluster. See the descriptions of the child properties of nodeConfig.
243 "serviceAccounts": [ # The optional list of ServiceAccounts, each with their specified scopes, to be made available on all of the node VMs. In addition to the service accounts and scopes specified, the "default" account will always be created with the following scopes to ensure the correct functioning of the cluster:
244 # - https://www.googleapis.com/auth/compute,
245 # - https://www.googleapis.com/auth/devstorage.read_only
246 { # A Compute Engine service account.
247 "scopes": [ # The list of scopes to be made available for this service account.
248 "A String",
249 ],
250 "email": "A String", # Email address of the service account.
251 },
252 ],
253 "machineType": "A String", # The name of a Google Compute Engine machine type (e.g. n1-standard-1).
254 #
255 # If unspecified, the default machine type is n1-standard-1.
256 "sourceImage": "A String", # The fully-specified name of a Google Compute Engine image. For example: https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/backports-debian-7-wheezy-vYYYYMMDD (where YYYMMDD is the version date).
257 #
258 # If specifying an image, you are responsible for ensuring its compatibility with the Debian 7 backports image. We recommend leaving this field blank to accept the default backports-debian-7-wheezy value.
259 },
260 "statusMessage": "A String", # [Output only] Additional information about the current status of this cluster, if available.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000261 "servicesIpv4Cidr": "A String", # [Output only] The IP address range of the Kubernetes services in this cluster, in CIDR notation (e.g. 1.2.3.4/29). Service addresses are typically put in the last /16 from the container CIDR.
Craig Citroe633be12015-03-02 13:40:36 -0800262 "creationTimestamp": "A String", # [Output only] The time the cluster was created, in RFC3339 text format.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000263 "enableCloudLogging": True or False, # Whether logs from the cluster should be made available via the Google Cloud Logging service. This includes both logs from your applications running in the cluster as well as logs from the Kubernetes components themselves.
Craig Citroe633be12015-03-02 13:40:36 -0800264 "selfLink": "A String", # [Output only] Server-defined URL for the resource.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000265 "enableCloudMonitoring": True or False, # Whether metrics from the cluster should be made available via the Google Cloud Monitoring service.
Craig Citroe633be12015-03-02 13:40:36 -0800266 }</pre>
267</div>
268
269<div class="method">
270 <code class="details" id="list">list(projectId, zoneId)</code>
271 <pre>Lists all clusters owned by a project in the specified zone.
272
273Args:
274 projectId: string, The Google Developers Console project ID or project number. (required)
275 zoneId: string, The name of the Google Compute Engine zone in which the cluster resides. (required)
276
277Returns:
278 An object of the form:
279
280 {
281 "clusters": [ # A list of clusters in the project in the specified zone.
282 {
283 "status": "A String", # [Output only] The current status of this cluster.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000284 "containerIpv4Cidr": "A String", # The IP address range of the container pods in this cluster, in CIDR 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 or 172.16.0.0/12.
Craig Citroe633be12015-03-02 13:40:36 -0800285 "description": "A String", # An optional description of this cluster.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000286 "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:
287 # - Lowercase letters, numbers, and hyphens only.
288 # - Must start with a letter.
289 # - Must end with a number or a letter.
Craig Citroe633be12015-03-02 13:40:36 -0800290 "numNodes": 42, # The number of nodes to create in this cluster. You must ensure that your Compute Engine resource quota is sufficient for this number of instances plus one (to include the master). You must also have available firewall and routes quota.
291 "nodeRoutingPrefixSize": 42, # [Output only] The size of the address space on each node for hosting containers.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000292 "instanceGroupUrls": [ # [Output only] The resource URLs of [instance groups](/compute/docs/instance-groups/) associated with this cluster.
293 "A String",
294 ],
295 "masterAuth": { # The authentication information for accessing the master. Authentication is either done using HTTP basic authentication or using a bearer token. # The authentication information for accessing the master.
296 "bearerToken": "A String", # The token used to authenticate API requests to the master. The token is to be included in an HTTP Authorization Header in all requests to the master endpoint. The format of the header is: "Authorization: Bearer ".
297 "clientKey": "A String", # [Output only] Base64 encoded private key used by clients to authenticate to the cluster endpoint.
298 "clientCertificate": "A String", # [Output only] Base64 encoded public certificate used by clients to authenticate to the cluster endpoint.
299 "user": "A String", # The username to use for HTTP basic authentication when accessing the Kubernetes master endpoint.
300 "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.
301 "clusterCaCertificate": "A String", # [Output only] Base64 encoded public certificate that is the root of trust for the cluster.
Craig Citroe633be12015-03-02 13:40:36 -0800302 },
303 "clusterApiVersion": "A String", # The API version of the Kubernetes master and kubelets running in this cluster. Leave blank to pick up the latest stable release, or specify a version of the form "x.y.z". The Google Container Engine release notes lists the currently supported versions. If an incorrect version is specified, the server returns an error listing the currently supported versions.
304 "network": "A String", # The name of the Google Compute Engine network to which the cluster is connected.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000305 "zone": "A String", # [Output only] The name of the Google Compute Engine zone in which the cluster resides.
306 "endpoint": "A String", # [Output only] The IP address of this cluster's Kubernetes master. The endpoint can be accessed from the internet at https://username:password@endpoint/.
307 #
308 # See the masterAuth property of this resource for username and password information.
Craig Citroe633be12015-03-02 13:40:36 -0800309 "nodeConfig": { # The machine type and image to use for all nodes in this cluster. See the descriptions of the child properties of nodeConfig.
310 "serviceAccounts": [ # The optional list of ServiceAccounts, each with their specified scopes, to be made available on all of the node VMs. In addition to the service accounts and scopes specified, the "default" account will always be created with the following scopes to ensure the correct functioning of the cluster:
311 # - https://www.googleapis.com/auth/compute,
312 # - https://www.googleapis.com/auth/devstorage.read_only
313 { # A Compute Engine service account.
314 "scopes": [ # The list of scopes to be made available for this service account.
315 "A String",
316 ],
317 "email": "A String", # Email address of the service account.
318 },
319 ],
320 "machineType": "A String", # The name of a Google Compute Engine machine type (e.g. n1-standard-1).
321 #
322 # If unspecified, the default machine type is n1-standard-1.
323 "sourceImage": "A String", # The fully-specified name of a Google Compute Engine image. For example: https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/backports-debian-7-wheezy-vYYYYMMDD (where YYYMMDD is the version date).
324 #
325 # If specifying an image, you are responsible for ensuring its compatibility with the Debian 7 backports image. We recommend leaving this field blank to accept the default backports-debian-7-wheezy value.
326 },
327 "statusMessage": "A String", # [Output only] Additional information about the current status of this cluster, if available.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000328 "servicesIpv4Cidr": "A String", # [Output only] The IP address range of the Kubernetes services in this cluster, in CIDR notation (e.g. 1.2.3.4/29). Service addresses are typically put in the last /16 from the container CIDR.
Craig Citroe633be12015-03-02 13:40:36 -0800329 "creationTimestamp": "A String", # [Output only] The time the cluster was created, in RFC3339 text format.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000330 "enableCloudLogging": True or False, # Whether logs from the cluster should be made available via the Google Cloud Logging service. This includes both logs from your applications running in the cluster as well as logs from the Kubernetes components themselves.
Craig Citroe633be12015-03-02 13:40:36 -0800331 "selfLink": "A String", # [Output only] Server-defined URL for the resource.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000332 "enableCloudMonitoring": True or False, # Whether metrics from the cluster should be made available via the Google Cloud Monitoring service.
Craig Citroe633be12015-03-02 13:40:36 -0800333 },
334 ],
335 }</pre>
336</div>
337
338</body></html>