Documentation ¶
Overview ¶
Package container provides access to the Google Container Engine API.
See https://cloud.google.com/container-engine/docs/v1beta1/
Usage example:
import "google.golang.org/api/container/v1beta1" ... containerService, err := container.New(oauthHttpClient)
Index ¶
- Constants
- type Cluster
- type CreateClusterRequest
- type ListAggregatedClustersResponse
- type ListAggregatedOperationsResponse
- type ListClustersResponse
- type ListOperationsResponse
- type MasterAuth
- type NodeConfig
- type Operation
- type ProjectsClustersListCall
- type ProjectsClustersService
- type ProjectsOperationsListCall
- type ProjectsOperationsService
- type ProjectsService
- type ProjectsZonesClustersCreateCall
- type ProjectsZonesClustersDeleteCall
- type ProjectsZonesClustersGetCall
- type ProjectsZonesClustersListCall
- type ProjectsZonesClustersService
- func (r *ProjectsZonesClustersService) Create(projectId string, zoneId string, createclusterrequest *CreateClusterRequest) *ProjectsZonesClustersCreateCall
- func (r *ProjectsZonesClustersService) Delete(projectId string, zoneId string, clusterId string) *ProjectsZonesClustersDeleteCall
- func (r *ProjectsZonesClustersService) Get(projectId string, zoneId string, clusterId string) *ProjectsZonesClustersGetCall
- func (r *ProjectsZonesClustersService) List(projectId string, zoneId string) *ProjectsZonesClustersListCall
- type ProjectsZonesOperationsGetCall
- type ProjectsZonesOperationsListCall
- type ProjectsZonesOperationsService
- type ProjectsZonesService
- type Service
- type ServiceAccount
Constants ¶
const (
// View and manage your data across Google Cloud Platform services
CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
)
OAuth2 scopes used by this API.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
type Cluster struct { // ClusterApiVersion: 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. ClusterApiVersion string `json:"clusterApiVersion,omitempty"` // ContainerIpv4Cidr: 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. ContainerIpv4Cidr string `json:"containerIpv4Cidr,omitempty"` // CreationTimestamp: [Output only] The time the cluster was created, in // RFC3339 text format. CreationTimestamp string `json:"creationTimestamp,omitempty"` // Description: An optional description of this cluster. Description string `json:"description,omitempty"` // EnableCloudLogging: 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. EnableCloudLogging bool `json:"enableCloudLogging,omitempty"` // Endpoint: [Output only] The IP address of this cluster's Kubernetes // master. 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. Endpoint string `json:"endpoint,omitempty"` // MasterAuth: The authentication information for accessing the master. MasterAuth *MasterAuth `json:"masterAuth,omitempty"` // Name: 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. Name string `json:"name,omitempty"` // Network: The name of the Google Compute Engine network to which the // cluster is connected. Network string `json:"network,omitempty"` // NodeConfig: The machine type and image to use for all nodes in this // cluster. See the descriptions of the child properties of nodeConfig. NodeConfig *NodeConfig `json:"nodeConfig,omitempty"` // NodeRoutingPrefixSize: [Output only] The size of the address space on // each node for hosting containers. NodeRoutingPrefixSize int64 `json:"nodeRoutingPrefixSize,omitempty"` // NumNodes: 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. NumNodes int64 `json:"numNodes,omitempty"` // SelfLink: [Output only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` // ServicesIpv4Cidr: [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. ServicesIpv4Cidr string `json:"servicesIpv4Cidr,omitempty"` // Status: [Output only] The current status of this cluster. // // Possible values: // "error" // "provisioning" // "running" // "stopping" Status string `json:"status,omitempty"` // StatusMessage: [Output only] Additional information about the current // status of this cluster, if available. StatusMessage string `json:"statusMessage,omitempty"` // Zone: [Output only] The name of the Google Compute Engine zone in // which the cluster resides. Zone string `json:"zone,omitempty"` }
type CreateClusterRequest ¶
type CreateClusterRequest struct { // Cluster: A cluster resource. Cluster *Cluster `json:"cluster,omitempty"` }
type ListAggregatedClustersResponse ¶
type ListAggregatedClustersResponse struct { // Clusters: A list of clusters in the project, across all zones. Clusters []*Cluster `json:"clusters,omitempty"` }
type ListAggregatedOperationsResponse ¶
type ListAggregatedOperationsResponse struct { // Operations: A list of operations in the project, across all zones. Operations []*Operation `json:"operations,omitempty"` }
type ListClustersResponse ¶
type ListClustersResponse struct { // Clusters: A list of clusters in the project in the specified zone. Clusters []*Cluster `json:"clusters,omitempty"` }
type ListOperationsResponse ¶
type ListOperationsResponse struct { // Operations: A list of operations in the project in the specified // zone. Operations []*Operation `json:"operations,omitempty"` }
type MasterAuth ¶
type MasterAuth struct { // BearerToken: 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 ". BearerToken string `json:"bearerToken,omitempty"` // Password: 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. Password string `json:"password,omitempty"` // User: The username to use for HTTP basic authentication when // accessing the Kubernetes master endpoint. User string `json:"user,omitempty"` }
type NodeConfig ¶
type NodeConfig struct { // MachineType: The name of a Google Compute Engine machine type (e.g. // n1-standard-1). // // If unspecified, the default machine type is n1-standard-1. MachineType string `json:"machineType,omitempty"` // 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: // - https://www.googleapis.com/auth/compute, // - https://www.googleapis.com/auth/devstorage.read_only ServiceAccounts []*ServiceAccount `json:"serviceAccounts,omitempty"` // SourceImage: The fully-specified name of a Google Compute Engine // image. For example: // https://www.googleapis.com/compute/v1/projects/debian-cloud/global/ima // ges/backports-debian-7-wheezy-vYYYYMMDD (where YYYMMDD is the version // date). // // 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. SourceImage string `json:"sourceImage,omitempty"` }
type Operation ¶
type Operation struct { // ErrorMessage: If an error has occurred, a textual description of the // error. ErrorMessage string `json:"errorMessage,omitempty"` // Name: The server-assigned ID for the operation. Name string `json:"name,omitempty"` // OperationType: The operation type. // // Possible values: // "createCluster" // "deleteCluster" OperationType string `json:"operationType,omitempty"` // SelfLink: Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` // Status: The current status of the operation. // // Possible values: // "done" // "pending" // "running" Status string `json:"status,omitempty"` // Target: [Optional] The URL of the cluster resource that this // operation is associated with. Target string `json:"target,omitempty"` // TargetLink: Server-defined URL for the target of the operation. TargetLink string `json:"targetLink,omitempty"` // Zone: The name of the Google Compute Engine zone in which the // operation is taking place. Zone string `json:"zone,omitempty"` }
type ProjectsClustersListCall ¶
type ProjectsClustersListCall struct {
// contains filtered or unexported fields
}
func (*ProjectsClustersListCall) Do ¶
func (c *ProjectsClustersListCall) Do() (*ListAggregatedClustersResponse, error)
func (*ProjectsClustersListCall) Fields ¶
func (c *ProjectsClustersListCall) Fields(s ...googleapi.Field) *ProjectsClustersListCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type ProjectsClustersService ¶
type ProjectsClustersService struct {
// contains filtered or unexported fields
}
func NewProjectsClustersService ¶
func NewProjectsClustersService(s *Service) *ProjectsClustersService
func (*ProjectsClustersService) List ¶
func (r *ProjectsClustersService) List(projectId string) *ProjectsClustersListCall
List: Lists all clusters owned by a project across all zones.
type ProjectsOperationsListCall ¶
type ProjectsOperationsListCall struct {
// contains filtered or unexported fields
}
func (*ProjectsOperationsListCall) Do ¶
func (c *ProjectsOperationsListCall) Do() (*ListAggregatedOperationsResponse, error)
func (*ProjectsOperationsListCall) Fields ¶
func (c *ProjectsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsOperationsListCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type ProjectsOperationsService ¶
type ProjectsOperationsService struct {
// contains filtered or unexported fields
}
func NewProjectsOperationsService ¶
func NewProjectsOperationsService(s *Service) *ProjectsOperationsService
func (*ProjectsOperationsService) List ¶
func (r *ProjectsOperationsService) List(projectId string) *ProjectsOperationsListCall
List: Lists all operations in a project, across all zones.
type ProjectsService ¶
type ProjectsService struct { Clusters *ProjectsClustersService Operations *ProjectsOperationsService Zones *ProjectsZonesService // contains filtered or unexported fields }
func NewProjectsService ¶
func NewProjectsService(s *Service) *ProjectsService
type ProjectsZonesClustersCreateCall ¶
type ProjectsZonesClustersCreateCall struct {
// contains filtered or unexported fields
}
func (*ProjectsZonesClustersCreateCall) Do ¶
func (c *ProjectsZonesClustersCreateCall) Do() (*Operation, error)
func (*ProjectsZonesClustersCreateCall) Fields ¶
func (c *ProjectsZonesClustersCreateCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersCreateCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type ProjectsZonesClustersDeleteCall ¶
type ProjectsZonesClustersDeleteCall struct {
// contains filtered or unexported fields
}
func (*ProjectsZonesClustersDeleteCall) Do ¶
func (c *ProjectsZonesClustersDeleteCall) Do() (*Operation, error)
func (*ProjectsZonesClustersDeleteCall) Fields ¶
func (c *ProjectsZonesClustersDeleteCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersDeleteCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type ProjectsZonesClustersGetCall ¶
type ProjectsZonesClustersGetCall struct {
// contains filtered or unexported fields
}
func (*ProjectsZonesClustersGetCall) Do ¶
func (c *ProjectsZonesClustersGetCall) Do() (*Cluster, error)
func (*ProjectsZonesClustersGetCall) Fields ¶
func (c *ProjectsZonesClustersGetCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersGetCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type ProjectsZonesClustersListCall ¶
type ProjectsZonesClustersListCall struct {
// contains filtered or unexported fields
}
func (*ProjectsZonesClustersListCall) Do ¶
func (c *ProjectsZonesClustersListCall) Do() (*ListClustersResponse, error)
func (*ProjectsZonesClustersListCall) Fields ¶
func (c *ProjectsZonesClustersListCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersListCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type ProjectsZonesClustersService ¶
type ProjectsZonesClustersService struct {
// contains filtered or unexported fields
}
func NewProjectsZonesClustersService ¶
func NewProjectsZonesClustersService(s *Service) *ProjectsZonesClustersService
func (*ProjectsZonesClustersService) Create ¶
func (r *ProjectsZonesClustersService) Create(projectId string, zoneId string, createclusterrequest *CreateClusterRequest) *ProjectsZonesClustersCreateCall
Create: Creates a cluster, consisting of the specified number and type of Google Compute Engine instances, plus a Kubernetes master instance.
The cluster is created in the project's default network.
A 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.
Finally, an entry is added to the project's global metadata indicating which CIDR range is being used by the cluster.
func (*ProjectsZonesClustersService) Delete ¶
func (r *ProjectsZonesClustersService) Delete(projectId string, zoneId string, clusterId string) *ProjectsZonesClustersDeleteCall
Delete: Deletes the cluster, including the Kubernetes master and all worker nodes.
Firewalls and routes that were configured at cluster creation are also deleted.
func (*ProjectsZonesClustersService) Get ¶
func (r *ProjectsZonesClustersService) Get(projectId string, zoneId string, clusterId string) *ProjectsZonesClustersGetCall
Get: Gets a specific cluster.
func (*ProjectsZonesClustersService) List ¶
func (r *ProjectsZonesClustersService) List(projectId string, zoneId string) *ProjectsZonesClustersListCall
List: Lists all clusters owned by a project in the specified zone.
type ProjectsZonesOperationsGetCall ¶
type ProjectsZonesOperationsGetCall struct {
// contains filtered or unexported fields
}
func (*ProjectsZonesOperationsGetCall) Do ¶
func (c *ProjectsZonesOperationsGetCall) Do() (*Operation, error)
func (*ProjectsZonesOperationsGetCall) Fields ¶
func (c *ProjectsZonesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsZonesOperationsGetCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type ProjectsZonesOperationsListCall ¶
type ProjectsZonesOperationsListCall struct {
// contains filtered or unexported fields
}
func (*ProjectsZonesOperationsListCall) Do ¶
func (c *ProjectsZonesOperationsListCall) Do() (*ListOperationsResponse, error)
func (*ProjectsZonesOperationsListCall) Fields ¶
func (c *ProjectsZonesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsZonesOperationsListCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type ProjectsZonesOperationsService ¶
type ProjectsZonesOperationsService struct {
// contains filtered or unexported fields
}
func NewProjectsZonesOperationsService ¶
func NewProjectsZonesOperationsService(s *Service) *ProjectsZonesOperationsService
func (*ProjectsZonesOperationsService) Get ¶
func (r *ProjectsZonesOperationsService) Get(projectId string, zoneId string, operationId string) *ProjectsZonesOperationsGetCall
Get: Gets the specified operation.
func (*ProjectsZonesOperationsService) List ¶
func (r *ProjectsZonesOperationsService) List(projectId string, zoneId string) *ProjectsZonesOperationsListCall
List: Lists all operations in a project in a specific zone.
type ProjectsZonesService ¶
type ProjectsZonesService struct { Clusters *ProjectsZonesClustersService Operations *ProjectsZonesOperationsService // contains filtered or unexported fields }
func NewProjectsZonesService ¶
func NewProjectsZonesService(s *Service) *ProjectsZonesService
type Service ¶
type Service struct { BasePath string // API endpoint base URL UserAgent string // optional additional User-Agent fragment Projects *ProjectsService // contains filtered or unexported fields }