Documentation ¶
Index ¶
- type Client
- func NewClientFromKubeletKubeconfig() (client *Client, err error)
- func NewClientFromPKI(ca, crt, key []byte, endpoint *url.URL) (client *Client, err error)
- func NewForConfig(config *restclient.Config) (client *Client, err error)
- func NewTemporaryClientFromPKI(ca *x509.PEMEncodedCertificateAndKey, endpoint *url.URL) (client *Client, err error)
- func (h *Client) Cordon(name string) error
- func (h *Client) CordonAndDrain(node string) (err error)
- func (h *Client) Drain(node string) error
- func (h *Client) LabelNodeAsMaster(name string) (err error)
- func (h *Client) MasterIPs() (addrs []string, err error)
- func (h *Client) Uncordon(name string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶ added in v0.3.0
type Client struct {
*kubernetes.Clientset
}
Client represents a set of helper methods for interacting with the Kubernetes API.
func NewClientFromKubeletKubeconfig ¶ added in v0.3.0
NewClientFromKubeletKubeconfig initializes and returns a Client.
func NewClientFromPKI ¶ added in v0.3.0
NewClientFromPKI initializes and returns a Client.
nolint: interfacer
func NewForConfig ¶ added in v0.3.0
func NewForConfig(config *restclient.Config) (client *Client, err error)
NewForConfig initializes and returns a client using the provided config.
func NewTemporaryClientFromPKI ¶ added in v0.3.0
func NewTemporaryClientFromPKI(ca *x509.PEMEncodedCertificateAndKey, endpoint *url.URL) (client *Client, err error)
NewTemporaryClientFromPKI initializes a Kubernetes client using a certificate with a TTL of 10 minutes.
func (*Client) CordonAndDrain ¶ added in v0.3.0
CordonAndDrain cordons and drains a node in one call.
func (*Client) LabelNodeAsMaster ¶ added in v0.3.0
LabelNodeAsMaster labels a node with the required master label.
Click to show internal directories.
Click to hide internal directories.