Registry / auth / google-go-containerregistry-pkg-authn-k8schain

google-go-containerregistry-pkg-authn-k8schain

JSON →
librarygogounverified

Package k8schain exposes an implementation of the authn.Keychain interface based on the semantics the Kubelet follows when pulling images for a Pod in Kubernetes.

go get github.com/google/go-containerregistry/pkg/authn/k8schain
INSTALL
IMPORT
SIG · GOOGLE-GO-CONTAINE
G
google-go-containerregistry-pkg-authn-k8schain
authgo
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

k8schain
github.com/google/go-containerregistry/pkg/authn/k8schain

Create a Kubernetes-style keychain for container registry authentication.

package main import ( "context" "fmt" "github.com/google/go-containerregistry/pkg/authn/k8schain" ) func main() { kc, err := k8schain.New(context.Background(), "default", "my-service-account", nil) if err != nil { fmt.Println(err) return } auth, err := kc.Resolve(nil) if err != nil { fmt.Println(err) return } fmt.Println(auth) }
Debug
Known issues
gotchaRequires a Kubernetes cluster or kubeconfig to function; not for standalone use.
fix
Ensure kubeconfig is available or use in-cluster config.
affects: *
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Dependencies

No dependency data recorded yet.

Agent activity
18 hits · last 30 days
node
16
OpenAI (training)
1
Resources
google-go-containerregistry-pkg-authn-k8schain — go get google-go-containerregistry-pkg-authn-k8schain · libregistry