gke

package
v0.0.0-...-6cf66fa Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 17, 2024 License: Apache-2.0, MIT Imports: 9 Imported by: 1

Documentation

Overview

Package gke contains functions to interact with Google Kubernetes Engine.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCluster

func GetCluster(ctx context.Context, clusterURL ClusterURL) (*cluster.Cluster, error)

GetCluster returns a Kubernetes client for the given named cluster.

Types

type ClusterURL

type ClusterURL struct {
	ProjectID   string
	Location    string
	ClusterName string
}

ClusterURL represents a GKE cluster URL of the format: "projects/$MYPROJECT/locations/$CONTINENT-$LOCATION/clusters/$CLUSTER"

func NewClusterURL

func NewClusterURL(url string) (ClusterURL, error)

NewClusterURL parses the cluster URL.

func (ClusterURL) String

func (c ClusterURL) String() string

String returns the cluster URL string.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL