kubehelpers

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package kubehelpers contains helper functions for interacting with Kubernetes clusters and resources.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectWithConfig

func ConnectWithConfig(abspath string) (*kubernetes.Clientset, error)

ConnectWithConfig takes an absolute path to a kube config file which is used to connect to the Kubernetes API.

func ConnectWithinCluster

func ConnectWithinCluster() (*kubernetes.Clientset, error)

ConnectWithinCluster uses Kubernetes utility functions to locate the credentials within the cluster and connect to the API.

func ContainerForName

func ContainerForName(name string, containers []corev1.Container) *corev1.Container

ContainerForName accepts a string and a slice of containers. It returns a pointer to the container with a name that matches the string. If no names match, it returns nil.

Types

This section is empty.

Jump to

Keyboard shortcuts

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