examples/

directory
v1.14.4 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2019 License: Apache-2.0, Apache-2.0

README

client-go Examples

This directory contains examples that cover various use cases and functionality for client-go.

Auth plugins

Client configuration is typically loaded from kubeconfig files containing server and credential configuration. Several plugins for obtaining credentials from external sources are available, but are not loaded by default. To enable these plugins in your program, import them in your main package.

You can load all auth plugins:

import _ "k8s.io/client-go/plugin/pkg/client/auth

Or you can load specific auth plugins:

import _ "k8s.io/client-go/plugin/pkg/client/auth/azure"
import _ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
import _ "k8s.io/client-go/plugin/pkg/client/auth/oidc"
import _ "k8s.io/client-go/plugin/pkg/client/auth/openstack"
Configuration
Basics
Advanced Concepts
Testing

Directories

Path Synopsis
Note: the example only works with the code within the same release/branch.
Note: the example only works with the code within the same release/branch.
Package fakeclient contains examples on how to use fakeclient in tests.
Package fakeclient contains examples on how to use fakeclient in tests.
Note: the example only works with the code within the same release/branch.
Note: the example only works with the code within the same release/branch.
Note: the example only works with the code within the same release/branch.
Note: the example only works with the code within the same release/branch.

Jump to

Keyboard shortcuts

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