blob: 50a1aaa3c5c470c9e173f6edbc317e3fe98dca65 [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
98Finally, a route named k8s-iproute-10-xx-0-0 is created to track that the cluster's 10.xx.0.0/16 CIDR has been assigned.
99
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.
109 "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/.
110 #
111 # See the masterAuth property of this resource for username and password information.
112 "description": "A String", # An optional description of this cluster.
113 "zone": "A String", # [Output only] The name of the Google Compute Engine zone in which the cluster resides.
114 "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.
115 "nodeRoutingPrefixSize": 42, # [Output only] The size of the address space on each node for hosting containers.
116 "masterAuth": { # The HTTP basic authentication information for accessing the master. Because the master endpoint is open to the internet, you should create a strong password.
117 "password": "A String", # The password to use when accessing the Kubernetes master endpoint.
118 "user": "A String", # The username to use when accessing the Kubernetes master endpoint.
119 },
120 "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.
121 "network": "A String", # The name of the Google Compute Engine network to which the cluster is connected.
122 "containerIpv4Cidr": "A String", # [Output only] The IP addresses of the container pods in this cluster, in CIDR notation (e.g. 1.2.3.4/29).
123 "nodeConfig": { # The machine type and image to use for all nodes in this cluster. See the descriptions of the child properties of nodeConfig.
124 "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:
125 # - https://www.googleapis.com/auth/compute,
126 # - https://www.googleapis.com/auth/devstorage.read_only
127 { # A Compute Engine service account.
128 "scopes": [ # The list of scopes to be made available for this service account.
129 "A String",
130 ],
131 "email": "A String", # Email address of the service account.
132 },
133 ],
134 "machineType": "A String", # The name of a Google Compute Engine machine type (e.g. n1-standard-1).
135 #
136 # If unspecified, the default machine type is n1-standard-1.
137 "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).
138 #
139 # 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.
140 },
141 "statusMessage": "A String", # [Output only] Additional information about the current status of this cluster, if available.
142 "servicesIpv4Cidr": "A String", # [Output only] The IP addresses of the Kubernetes services in this cluster, in CIDR notation (e.g. 1.2.3.4/29). Service addresses are always in the 10.0.0.0/16 range.
143 "creationTimestamp": "A String", # [Output only] The time the cluster was created, in RFC3339 text format.
144 "selfLink": "A String", # [Output only] Server-defined URL for the resource.
145 "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:
146 # - Lowercase letters, numbers, and hyphens only.
147 # - Must start with a letter.
148 # - Must end with a number or a letter.
149 },
150 }
151
152
153Returns:
154 An object of the form:
155
156 { # Defines the operation resource. All fields are output only.
157 "status": "A String", # The current status of the operation.
158 "name": "A String", # The server-assigned ID for this operation. If the operation is fulfilled upfront, it may not have a resource name.
159 "zone": "A String", # The name of the Google Compute Engine zone in which the operation is taking place.
160 "errorMessage": "A String", # If an error has occurred, a textual description of the error.
161 "targetLink": "A String", # Server-defined URL for the target of the operation.
162 "operationType": "A String", # The operation type.
163 "selfLink": "A String", # Server-defined URL for the resource.
164 "target": "A String", # [Optional] The URL of the cluster resource that this operation is associated with.
165 }</pre>
166</div>
167
168<div class="method">
169 <code class="details" id="delete">delete(projectId, zoneId, clusterId)</code>
170 <pre>Deletes the cluster, including the Kubernetes master and all worker nodes.
171
172Firewalls and routes that were configured at cluster creation are also deleted.
173
174Args:
175 projectId: string, The Google Developers Console project ID or project number. (required)
176 zoneId: string, The name of the Google Compute Engine zone in which the cluster resides. (required)
177 clusterId: string, The name of the cluster to delete. (required)
178
179Returns:
180 An object of the form:
181
182 { # Defines the operation resource. All fields are output only.
183 "status": "A String", # The current status of the operation.
184 "name": "A String", # The server-assigned ID for this operation. If the operation is fulfilled upfront, it may not have a resource name.
185 "zone": "A String", # The name of the Google Compute Engine zone in which the operation is taking place.
186 "errorMessage": "A String", # If an error has occurred, a textual description of the error.
187 "targetLink": "A String", # Server-defined URL for the target of the operation.
188 "operationType": "A String", # The operation type.
189 "selfLink": "A String", # Server-defined URL for the resource.
190 "target": "A String", # [Optional] The URL of the cluster resource that this operation is associated with.
191 }</pre>
192</div>
193
194<div class="method">
195 <code class="details" id="get">get(projectId, zoneId, clusterId)</code>
196 <pre>Gets a specific cluster.
197
198Args:
199 projectId: string, The Google Developers Console project ID or project number. (required)
200 zoneId: string, The name of the Google Compute Engine zone in which the cluster resides. (required)
201 clusterId: string, The name of the cluster to retrieve. (required)
202
203Returns:
204 An object of the form:
205
206 {
207 "status": "A String", # [Output only] The current status of this cluster.
208 "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/.
209 #
210 # See the masterAuth property of this resource for username and password information.
211 "description": "A String", # An optional description of this cluster.
212 "zone": "A String", # [Output only] The name of the Google Compute Engine zone in which the cluster resides.
213 "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.
214 "nodeRoutingPrefixSize": 42, # [Output only] The size of the address space on each node for hosting containers.
215 "masterAuth": { # The HTTP basic authentication information for accessing the master. Because the master endpoint is open to the internet, you should create a strong password.
216 "password": "A String", # The password to use when accessing the Kubernetes master endpoint.
217 "user": "A String", # The username to use when accessing the Kubernetes master endpoint.
218 },
219 "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.
220 "network": "A String", # The name of the Google Compute Engine network to which the cluster is connected.
221 "containerIpv4Cidr": "A String", # [Output only] The IP addresses of the container pods in this cluster, in CIDR notation (e.g. 1.2.3.4/29).
222 "nodeConfig": { # The machine type and image to use for all nodes in this cluster. See the descriptions of the child properties of nodeConfig.
223 "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:
224 # - https://www.googleapis.com/auth/compute,
225 # - https://www.googleapis.com/auth/devstorage.read_only
226 { # A Compute Engine service account.
227 "scopes": [ # The list of scopes to be made available for this service account.
228 "A String",
229 ],
230 "email": "A String", # Email address of the service account.
231 },
232 ],
233 "machineType": "A String", # The name of a Google Compute Engine machine type (e.g. n1-standard-1).
234 #
235 # If unspecified, the default machine type is n1-standard-1.
236 "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).
237 #
238 # 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.
239 },
240 "statusMessage": "A String", # [Output only] Additional information about the current status of this cluster, if available.
241 "servicesIpv4Cidr": "A String", # [Output only] The IP addresses of the Kubernetes services in this cluster, in CIDR notation (e.g. 1.2.3.4/29). Service addresses are always in the 10.0.0.0/16 range.
242 "creationTimestamp": "A String", # [Output only] The time the cluster was created, in RFC3339 text format.
243 "selfLink": "A String", # [Output only] Server-defined URL for the resource.
244 "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:
245 # - Lowercase letters, numbers, and hyphens only.
246 # - Must start with a letter.
247 # - Must end with a number or a letter.
248 }</pre>
249</div>
250
251<div class="method">
252 <code class="details" id="list">list(projectId, zoneId)</code>
253 <pre>Lists all clusters owned by a project in the specified zone.
254
255Args:
256 projectId: string, The Google Developers Console project ID or project number. (required)
257 zoneId: string, The name of the Google Compute Engine zone in which the cluster resides. (required)
258
259Returns:
260 An object of the form:
261
262 {
263 "clusters": [ # A list of clusters in the project in the specified zone.
264 {
265 "status": "A String", # [Output only] The current status of this cluster.
266 "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/.
267 #
268 # See the masterAuth property of this resource for username and password information.
269 "description": "A String", # An optional description of this cluster.
270 "zone": "A String", # [Output only] The name of the Google Compute Engine zone in which the cluster resides.
271 "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.
272 "nodeRoutingPrefixSize": 42, # [Output only] The size of the address space on each node for hosting containers.
273 "masterAuth": { # The HTTP basic authentication information for accessing the master. Because the master endpoint is open to the internet, you should create a strong password.
274 "password": "A String", # The password to use when accessing the Kubernetes master endpoint.
275 "user": "A String", # The username to use when accessing the Kubernetes master endpoint.
276 },
277 "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.
278 "network": "A String", # The name of the Google Compute Engine network to which the cluster is connected.
279 "containerIpv4Cidr": "A String", # [Output only] The IP addresses of the container pods in this cluster, in CIDR notation (e.g. 1.2.3.4/29).
280 "nodeConfig": { # The machine type and image to use for all nodes in this cluster. See the descriptions of the child properties of nodeConfig.
281 "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:
282 # - https://www.googleapis.com/auth/compute,
283 # - https://www.googleapis.com/auth/devstorage.read_only
284 { # A Compute Engine service account.
285 "scopes": [ # The list of scopes to be made available for this service account.
286 "A String",
287 ],
288 "email": "A String", # Email address of the service account.
289 },
290 ],
291 "machineType": "A String", # The name of a Google Compute Engine machine type (e.g. n1-standard-1).
292 #
293 # If unspecified, the default machine type is n1-standard-1.
294 "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).
295 #
296 # 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.
297 },
298 "statusMessage": "A String", # [Output only] Additional information about the current status of this cluster, if available.
299 "servicesIpv4Cidr": "A String", # [Output only] The IP addresses of the Kubernetes services in this cluster, in CIDR notation (e.g. 1.2.3.4/29). Service addresses are always in the 10.0.0.0/16 range.
300 "creationTimestamp": "A String", # [Output only] The time the cluster was created, in RFC3339 text format.
301 "selfLink": "A String", # [Output only] Server-defined URL for the resource.
302 "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:
303 # - Lowercase letters, numbers, and hyphens only.
304 # - Must start with a letter.
305 # - Must end with a number or a letter.
306 },
307 ],
308 }</pre>
309</div>
310
311</body></html>