package kubectlctx

import "gvisor.dev/gvisor/test/kubernetes/k8sctx/kubectlctx"

Package kubectlctx provides a KubernetesContext that uses one or more kubectl configs to determine the cluster(s) to use for tests and benchmarks. See parent package (`k8sctx`) for more info.

Index

Functions

func New

New creates a KubernetesContext using flags to determine which clusters to use for tests and benchmarks.

func NewFromKubectlContext

func NewFromKubectlContext(ctx context.Context, kubectlContext string) ([]*testcluster.TestCluster, error)

NewFromKubectlContext creates a test cluster from a kubectl config.

If the kubectl config is not specified, the default kubectl config is used. If the kubectl context is not specified, the default context within the kubectl config is used.

func NewFromRangeDir

func NewFromRangeDir(ctx context.Context, rangeDir string) ([]*testcluster.TestCluster, error)

NewFromRangeDir creates a set of test clusters from a test range directory.

Source Files

kubectlctx.go

Version
v0.0.0-20250605235530-a6711d1e1dc6 (latest)
Published
Jun 5, 2025
Platform
linux/amd64
Imports
13 packages
Last checked
4 hours ago

Tools for package owners.