kubernetes

package
v0.7.0-alpha.5 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2020 License: MPL-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client added in v0.3.0

type Client struct {
	*kubernetes.Clientset
}

Client represents a set of helper methods for interacting with the Kubernetes API.

func NewClientFromKubeletKubeconfig added in v0.3.0

func NewClientFromKubeletKubeconfig() (client *Client, err error)

NewClientFromKubeletKubeconfig initializes and returns a Client.

func NewClientFromPKI added in v0.3.0

func NewClientFromPKI(ca, crt, key []byte, endpoint *url.URL) (client *Client, err error)

NewClientFromPKI initializes and returns a Client.

nolint: interfacer

func NewForConfig added in v0.3.0

func NewForConfig(config *restclient.Config) (client *Client, err error)

NewForConfig initializes and returns a client using the provided config.

func NewTemporaryClientFromPKI added in v0.3.0

func NewTemporaryClientFromPKI(ca *x509.PEMEncodedCertificateAndKey, endpoint *url.URL) (client *Client, err error)

NewTemporaryClientFromPKI initializes a Kubernetes client using a certificate with a TTL of 10 minutes.

func (*Client) Cordon added in v0.3.0

func (h *Client) Cordon(name string) error

Cordon marks a node as unschedulable.

func (*Client) CordonAndDrain added in v0.3.0

func (h *Client) CordonAndDrain(node string) (err error)

CordonAndDrain cordons and drains a node in one call.

func (*Client) Drain added in v0.3.0

func (h *Client) Drain(node string) error

Drain evicts all pods on a given node.

func (*Client) LabelNodeAsMaster added in v0.3.0

func (h *Client) LabelNodeAsMaster(name string, taintNoSchedule bool) (err error)

LabelNodeAsMaster labels a node with the required master label and NoSchedule taint.

nolint: gocyclo

func (*Client) MasterIPs added in v0.3.0

func (h *Client) MasterIPs(ctx context.Context) (addrs []string, err error)

MasterIPs returns a list of control plane endpoints (IP addresses).

func (*Client) Uncordon added in v0.3.0

func (h *Client) Uncordon(name string, force bool) error

Uncordon marks a node as schedulable.

If force is set, node will be uncordoned even if cordoned not by Talos.

func (*Client) WaitUntilReady added in v0.6.0

func (h *Client) WaitUntilReady(name string) error

WaitUntilReady waits for a node to be ready.

func (*Client) WorkerIPs added in v0.6.0

func (h *Client) WorkerIPs(ctx context.Context) (addrs []string, err error)

WorkerIPs returns list of worker nodes IP addresses.

Jump to

Keyboard shortcuts

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