The examples below illustrate the use of Resource Definitions to realize a particular capability.
An example may contain several Resource Definitions working in conjunction.
These Resource Definitions may be of different Resource Types. Therefore, there is not always a one-to-one relationship of capability to Resource Type. Refer to the description of the individual examples for details.
The workload Resource Type can be used to make updates to resources before they are deployed into the cluster. In this example, a Resource Definition implementing the
workload
Resource Type is used to inject the Open Telemetry agent as a sidecar into every workload. In addition to adding the sidecar, it also adds an environment variable called OTEL_EXPORTER_OTLP_ENDPOINT
to each container running in the workload.
(...)
This section contains example Resource Definitions using the Template Driver for the affinity of Kubernetes Pods.
(...)
This section contains example Resource Definitions using the Humanitec Agent for connecting to AKS clusters.
(...)
This section contains example Resource Definitions using the Humanitec Agent for connecting to EKS clusters.
(...)
This section contains example Resource Definitions using the Humanitec Agent for connecting to GKE clusters.
(...)
This section shows how to use the Template Driver for managing annotations on Kubernetes objects.
(...)
Humanitec manages the state file for the
local
backend. This is the backend that is used if no backend is specified.
(...)
This section contains an example of Resource Definitions using the Terraform Driver and illustrating the co-provisioning concept.
(...)
This section contains example Resource Definitions using static credentials for connecting to AKS clusters.
(...)
This section contains example Resource Definitions using static credentials for connecting to EKS clusters.
(...)
This section contains example Resource Definitions using static credentials for connecting to a Git repository in (GitOps mode).
(...)
This section contains example Resource Definitions using static credentials for connecting to GKE clusters.
(...)
This section contains example Resource Definitions using static credentials for connecting to generic Kubernetes clusters.
(...)
Different Terraform providers have different ways of being configured. Generally, there are 3 ways that providers can be configured:
(...)
This section contains an example of providing a custom git-config to be used by Terraform when accessing modules sources from private git repositories.
(...)
This section shows how to use the Template Driver for configuring cluster access to a private container image registry.
(...)
This section contains examlle Resource Definitions for handling Kubernetes ingress traffic using the Ingress Driver.
(...)
This section contains example Resource Definitions using the Echo Driver for managing Kubernetes namespaces.
(...)
This section contains example Resource Definitions using the Template Driver for managing Kubernetes namespaces.
(...)
This example shows a sample usage of the
base-env
Resource Type. It is one of the implicit Resource Types that always gets provisioned for a Deployment.
(...)
This section contains example Resource Definitions using the Template Driver for setting nodeSelectors on your Pods.
(...)
This section contains example Resource Definitions using the Echo Driver for PostgreSQL.
(...)
The Terraform Driver can access Terraform definitions stored in a Git repository. In the case that this repository requires authentication, you must supply credentials to the Driver. The examples in this section show how to provide those as part of the secrets in the Resource Definition based on the Terraform Driver.
(...)
This example shows a sample usage of the
base-env
Resource Type. It is one of the implicit Resource Types that always gets provisioned for a Deployment.
(...)
The Terraform Driver can be configured to execute the Terraform scripts as part of a Kubernetes Job execution in a target Kubernetes cluster, instead of in the Humanitec infrastructure. In this case, you must supply access data to the cluster to the Humanitec Platform Orchestrator.
(...)
The Terraform Driver can be configured to execute the Terraform scripts as part of a Kubernetes Job execution in a target Kubernetes cluster, instead of in the Humanitec infrastructure. In this case, you must supply access data to the cluster to the Humanitec Platform Orchestrator.
(...)
This section contains example Resource Definitions using the Template Driver for adding Security Context on Kubernetes
Deployment
.
(...)
This section contains example Resource Definitions using the Template Driver for provisioning Kubernetes ServiceAccounts for your Workloads.
(...)
This section contains example Resource Definitions using the Template Driver for managing TLS Certificates in your cluster.
(...)
This section contains example Resource Definitions using the Template Driver for managing tolerations on your Pods.
(...)
This example illustrates how a Workload can use persistent storage service through the Kubernetes volumes system. It uses the
volume-pvc
Driver to create a PersistentVolume for your application. If you have special requirements for your PersistentVolume, you can also use the Template Driver to create it as shown in this other example.
This example will let participating Workloads share a common persistent storage service through the Kubernetes volumes system.
(...)
Wildcard Dns
DNS
This section contains example Resource Definitions using the Wildcard DNS Driver returning an externally managed DNS record for routing and ingress inside the cluster.
(...)