»Kubernetes

»Builders

Kubernetes uses Docker images for building, which are generated by these builders:

»kubernetes (platform)

Deploy the application into a Kubernetes cluster using Deployment objects.

»Interface

»Examples

deploy "kubernetes" {
    image_secret = "registry_secret"
    replicas = 3
    probe_path = "/_healthz"
}

»Required Parameters

This plugin has no required parameters.

»Optional Parameters

These parameters are used in the use stanza for this plugin.

»annotations

Annotations to be added to the application pod.

Annotations are added to the pod spec of the deployed application. This is useful when using mutating webhook admission controllers to further process pod events.

  • Type: map[string]string
  • Optional

»context

The kubectl context to use, as defined in the kubeconfig file.

  • Type: string
  • Optional

»image_secret

Name of the Kubernetes secrete to use for the image.

This references an existing secret, waypoint does not create this secret.

  • Type: string
  • Optional

»kubeconfig

Path to the kubeconfig file to use.

By default uses from current user's home directory.

  • Type: string
  • Optional

»namespace

Namespace to target deployment into.

Namespace is the name of the Kubernetes namespace to apply the deployment in. This is useful to create deployments in non-default namespaces without creating kubeconfig contexts for each.

  • Type: string
  • Optional

»ports

A map of ports and options that the application is listening on.

Used to define and expose multiple ports that the application is listening on for the container in use. Available keys are 'port', 'name' , 'host_port', and 'host_ip'. Ports defined will be TCP protocol.

  • Type: []map[string]string
  • Optional

»probe_path

The HTTP path to request to test that the application is running.

Without this, the test will simply be that the application has bound to the port.

  • Type: string
  • Optional

»replicas

The number of replicas to maintain.

If the replica count is maintained outside waypoint, for instance by a pod autoscaler, do not set this variable.

  • Type: int32
  • Optional

»resources

A map of resource limits and requests to apply to a pod on deploy.

Resource limits and requests for a pod. limits and requests options must start with either 'limits' or 'requests'. Any other options will be ignored.

  • Type: map[string]string
  • Optional

»scratch_path

A path for the service to store temporary data.

A path to a directory that will be created for the service to store temporary data using tmpfs.

  • Type: string
  • Optional

»service_account

Service account name to be added to the application pod.

Service account is the name of the Kubernetes service account to add to the pod. This is useful to apply Kubernetes RBAC to the application.

  • Type: string
  • Optional

»service_port

The TCP port that the application is listening on.

By default, this config variable is used for exposing a single port for the container in use. For multi-port configuration, use 'ports' instead.

  • Type: uint
  • Optional
  • Default: 3000

»static_environment

Environment variables to control broad modes of the application.

Environment variables that are meant to configure the application in a static way. This might be control an image that has multiple modes of operation, selected via environment variable. Most configuration should use the waypoint config commands.

  • Type: map[string]string
  • Optional

»Output Attributes

Output attributes can be used in your waypoint.hcl as variables via artifact or deploy.

»id

  • Type: string

»name

  • Type: string

»kubernetes (releasemanager)

Manipulates the Kubernetes Service activate Deployments.

»Interface

»Required Parameters

This plugin has no required parameters.

»Optional Parameters

These parameters are used in the use stanza for this plugin.

»context

The kubectl context to use, as defined in the kubeconfig file.

  • Type: string
  • Optional

»kubeconfig

Path to the kubeconfig file to use.

By default uses from current user's home directory.

  • Type: string
  • Optional

»load_balancer

Indicates if the Kubernetes Service should LoadBalancer type.

If the Kubernetes Service is not a LoadBalancer and node_port is not set, then the Service uses ClusterIP.

  • Type: bool
  • Optional

»namespace

Namespace to create Service in.

Namespace is the name of the Kubernetes namespace to create the deployment in This is useful to create Services in non-default namespaces without creating kubeconfig contexts for each.

  • Type: string
  • Optional

»node_port

The TCP port that the Service should consume as a NodePort.

If this is set but load_balancer is not, the service will be NodePort type, but if load_balancer is also set, it will be LoadBalancer.

  • Type: uint
  • Optional

»port

The TCP port that the application is listening on.

  • Type: uint
  • Optional
  • Default: 80

»ports

A map of ports and options that the application is listening on.

Used to define and configure multiple ports that the application is listening on. Available keys are 'port', 'node_port', and 'target_port'. If 'node_port' is set but 'load_balancer' is not, the service will be NodePort type. If 'load_balancer' is also set, it will be LoadBalancer. Ports defined will be TCP protocol.

  • Type: []map[string]string
  • Optional

»kubernetes (configsourcer)

Read configuration values from Kubernetes ConfigMap or Secret resources.

»Examples

config {
  env = {
    PORT = configdynamic("kubernetes", {
      name = "my-config-map"
      key = "port"
    })

    DATABASE_PASSWORD = configdynamic("kubernetes", {
      name = "database-creds"
      key = "password"
      secret = true
    })
  }
}

»Required Parameters

These parameters are used in configdynamic for dynamic configuration syncing.

»key

The key in the ConfigMap or Secret to read the value from.

ConfigMaps and Secrets store data in key/value format. This specifies the key to read from the resource. If you want multiple values you must specify multiple dynamic values.

  • Type: string

»name

The name of the ConfigMap of Secret.

  • Type: string

»Optional Parameters

These parameters are used in configdynamic for dynamic configuration syncing.

»namespace

The namespace to load the ConfigMap or Secret from.

By default this will use the namespace of the running pod. If this config source is used outside of a pod, this will use the namespace from the kubeconfig.

  • Type: string
  • Optional

»secret

This must be set to true to read from a Secret. If it is false we read from a ConfigMap.

  • Type: bool
  • Optional