# Functions
AddClusterToConfig will append a new cluster to the kubectl config, based on its endpoint and certificate authority data.
AddContextToConfig will add a new context to the kubectl config that ties the provided cluster to the auth info.
AddEksAuthInfoToConfig will add an exec command based AuthInfo entry to the kubectl config that is designed to retrieve the Kubernetes auth token using AWS IAM credentials.
AddEksConfigContext will add the EKS cluster authentication info as a new context in the kubectl config.
AddToSecretFromData will add data to the secret at the provided key.
AddToSecretFromFile will add data to the secret from a file, attached using the provided key.
CordonNodes calls `kubectl cordon` on each node provided.
This will create an initial blank config.
CreateRole will create the provided role on the Kubernetes cluster.
CreateRoleBinding will create the provided role binding on the Kubernetes cluster.
CreateSecret will create the provided secret on the Kubernetes cluster.
DeleteRole will delete the role in the provided namespace that has the provided name.
DeleteRole will delete the role in the provided namespace that has the provided name.
DeleteSecret will delete the secret in the provided namespace that has the provided name.
DrainNodes calls `kubectl drain` on each node provided.
GetAllServices queries Kubernetes for information on all deployed Service resources in the current cluster that the provided client can access.
GetAWSLoadBalancers will query Kubernetes for all services, filter for LoadBalancer services, and then parse out the following information: - Type of LB (NLB or Classic LB) - Instance target or IP target TODO: support ALBs with Ingress as well.
GetIngress returns a Kubernetes Ingress resource in the provided namespace with the given name.
GetIngressEndpoints returns all the available ingress endpoints (preferring hostnames, and if unavailable, returning IPs).
No description provided by the author
GetKubernetesClientFromOptions returns a Kubernetes API client given a KubectlOptions object.
GetLoadBalancerNameFromService will return the name of the LoadBalancer given a Kubernetes service object.
GetLoadBalancerTypeFromService will return the ELB type and target type of the given LoadBalancer Service.
GetNodes queries Kubernetes for information about the worker nodes registered to the cluster, given a clientset.
GetRole will get an RBAC role by name in the provided namespace.
GetRoleBinding will get an RBAC role binding by name in the provided namespace.
GetSecret will get a Kubernetes secret by name in the provided namespace.
No description provided by the author
IsIngressAvailable returns true if the Ingress endpoint is provisioned and available.
IsNodeReady takes a Kubernetes Node information object and checks if the Node is in the ready state.
IsPodReady returns True when a Pod is in the Ready status.
KubeConfigPathFromHomeDir returns a string to the default Kubernetes config path in the home directory.
LabelsToListOptions takes a map of label keys/values and returns ListOptions with LabelSelector.
ListPods will look for pods in the given namespace and return them.
ListRoleBindings will list all role bindings that match the provided filters in the provided namespace.
ListRole will list all roles that match the provided filters in the provided namespace.
ListSecrets will list all the secrets that match the provided filters in the provided namespace.
LoadApiClientConfig will load a ClientConfig object from a file path that points to a location on disk containing a kubectl config, with the requested context loaded.
LoadApiClientConfigFromOptions will load a ClientConfig object based on the provided KubectlOptions.
LoadConfigFromPath will load a ClientConfig object from a file path that points to a location on disk containing a kubectl config.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
PrepareTillerRole will construct a new Role struct with the provided metadata.
PrepareTillerRoleBinding will construct a new RoleBinding struct with the provided metadata.
PrepareSecret will construct a new Secret struct with the provided metadata.
RunKubectl will make a call to kubectl, setting the config and context to the ones specified in the provided options.
No description provided by the author
ValidateNamespaceExists will return an error if the provided namespace does not exist on the Kubernetes cluster.
ValidateServiceAccountExists will return an error if the provided service account does not exist on the provided namespace in the Kubernetes cluster.
WaitForNodesReady will continuously watch the nodes until they reach the ready state.
WaitUntilIngressEndpointProvisioned continuously checks the Ingress resource until the endpoint is provisioned or if it times out.
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
INITIAL_BLANK_KUBECONFIG is a bare, empty kubeconfig.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
AuthSchemeNotSupported is returned when the specified auth scheme in KubectlOptions is not supported.
AWSLoadBalancer is a struct that represents an AWS ELB that is associated with Kubernetes resources (Service or Ingress).
ContextAlreadyExistsError is returned when trying to create a new context with a name that is already in the config.
KubeContextNotFound error is returned when the specified Kubernetes context is unabailable in the specified kubeconfig.
Represents common options necessary to specify for all Kubectl calls.
LoadBalancerNameFormatError is returned when the hostname of the load balancer is in an unexpected format.
LoadBalancerNotReadyError is returned when the LoadBalancer Service is unexpectedly not ready.
NodeCordonError is returned when there is an error cordoning a node.
NodeDrainError is returned when there is an error draining a node.
NodeReadyTimeoutError is returned when we timeout waiting for nodes to reach ready state.
ProvisionIngressEndpointTimeoutError is returned when we time out waiting for the endpoint to be provisioned.
UnknownAWSLoadBalancerTypeErr is returned when we encounter a load balancer type that we don't expect/support.
# Type aliases
AuthScheme is an enum that indicates how to authenticate to the Kubernetes cluster.
ELBTargetType represents the different ways the AWS ELB routes to the services.
ELBType represents the underlying type of the load balancer (classic, network, or application).