kube

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package kube provides utilities for reading Kubernetes service account secrets.

It enables applications running in Kubernetes to access their namespace, service account token, and CA certificate from the standard mounted paths.

Index

Constants

View Source
const (
	FileNamespace = "/var/run/secrets/kubernetes.io/serviceaccount/namespace"
	FileToken     = "/var/run/secrets/kubernetes.io/serviceaccount/token" // #nosec G101 - standard K8s service account path
	FileCa        = "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt"
)

Variables

This section is empty.

Functions

func Certificate

func Certificate() (body string, err error)

func Namespace

func Namespace() (body string, err error)

func Token

func Token() (body string, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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