kube

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 27, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewFromKubeconfig

func NewFromKubeconfig(ctx context.Context, kubeconfigBytes []byte, serverURL string) (*Client, error)

NewFromKubeconfig creates a Client from raw kubeconfig bytes. If serverURL is non-empty, it overrides the server in the kubeconfig (e.g. "https://localhost:12345" when connecting through a published port).

func (*Client) Apply

func (c *Client) Apply(ctx context.Context, manifest []byte) error

Apply parses a multi-document YAML manifest and applies each resource to the cluster using server-side apply.

func (*Client) DeleteNode

func (c *Client) DeleteNode(ctx context.Context, nodeName string) error

DeleteNode removes the node object from Kubernetes.

func (*Client) DrainNode

func (c *Client) DrainNode(ctx context.Context, nodeName string) error

DrainNode cordons the node and evicts all non-DaemonSet pods.

func (*Client) LabelNode

func (c *Client) LabelNode(ctx context.Context, nodeName string, labels map[string]string) error

LabelNode adds the given labels to a node, overwriting any that already exist.

func (*Client) PatchDeployment

func (c *Client) PatchDeployment(ctx context.Context, namespace, name string, patch []byte) error

PatchDeployment applies a JSON patch to a deployment.

Jump to

Keyboard shortcuts

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