terraform-kubernetes-portainer
is a Terraform module for running Portainer on a
Kubernetes cluster. Portainer enables you to deploy applications
to your Kubernetes cluster without the need for manifests or helm charts. It is available
through the Terraform registry.
This has an upwards dependency on the portainer-k8s-beta image which itself is only in beta.
The module will create the following Kubernetes resources:
- Kubernetes Namespace
- Kubernetes ServiceAccount
- Kubernetes ClusterRoleBinding
- Kubernetes PersistentVolumeClaim
- Kubernetes Deployment
- Kubernetes Service with LoadBalancer
For a complete example, see examples/complete.
provider "kubernetes" {
config_path = var.kubeconf_path
config_context_auth_info = var.config_user
config_context_cluster = var.cluster_name
}
module "portainer" {
source = "jhole89/portainer/kubernetes"
version = "1.0.0"
}
IMPORTANT: The master
branch is used in examples
just as an example. Do not pin to master
because there may
be breaking changes between releases. Instead, pin to the release tag (e.g. ?ref=tags/x.y.z
) from
latest releases.
Name | Version |
---|---|
terraform | ~> 0.12.0 |
kubernetes | ~> 1.11 |
Name | Version |
---|---|
kubernetes | ~> 1.11 |
Name | Description | Type | Default | Required |
---|---|---|---|---|
edge_port | Agent EDGE port. | number |
8000 |
no |
http_port | LoadBalancer HTTP port. | number |
9000 |
no |
image | Docker image. | string |
"portainer/portainer-k8s-beta:linux-amd64" |
no |
labels | App labels to be used for namespace, service, and deployment. | map(string) |
{} |
no |
name | App name to be used for namespace, service, and deployment. | string |
"portainer" |
no |
service_type | Determines how the service is exposed | string |
"ClusterIP" |
no |
storage_class | Persisted Volume storage class | string |
"local-path" |
no |
storage_size | Persisted Volume storage size | string |
"128Mi" |
no |
Name | Description |
---|---|
crb_name | n/a |
deployment_name | n/a |
ingress | n/a |
namespace | n/a |
pvc_name | n/a |
service_account_name | n/a |
service_name | n/a |
service_url | n/a |
service_version | n/a |
Report issues/questions/feature requests on in the issues section.
Full contributing guidelines are covered here.
Created by Joel Lutman - [email protected]
This module is 100% Open Source and licensed under the APACHE2.
Like this project? Please give it a ★ on GitHub! (it helps a lot)