All Projects → remche → terraform-openstack-rke2

remche / terraform-openstack-rke2

Licence: MPL-2.0 license
Deploy Kubernetes on OpenStack with RKE2

Programming Languages

HCL
1544 projects
Smarty
1635 projects

Projects that are alternatives of or similar to terraform-openstack-rke2

ansible-role-rke2
Ansible Role to install RKE2 Kubernetes.
Stars: ✭ 118 (+210.53%)
Mutual labels:  rancher, kubernetes-deployment, rke2
Terraform Aws Eks
Terraform module to create an Elastic Kubernetes (EKS) cluster and associated worker instances on AWS
Stars: ✭ 2,464 (+6384.21%)
Mutual labels:  kubernetes-deployment, terraform-module
terraform-vultr-condor
Kubernetes Deployment Tool for Vultr
Stars: ✭ 60 (+57.89%)
Mutual labels:  kubernetes-deployment, terraform-module
paas-templates
Bosh, CFAR, CFCR and OSB services templates for use with COA (cf-ops-automation) framework
Stars: ✭ 16 (-57.89%)
Mutual labels:  openstack, rancher
spring-cloud-microservices-on-kubernetes
My Best Practices in development and deployment of Spring Cloud Microservices on Kubernetes.
Stars: ✭ 19 (-50%)
Mutual labels:  rancher, kubernetes-deployment
waldur-homeport
Waldur HomePort is web-based client for the Waldur MasterMind.
Stars: ✭ 22 (-42.11%)
Mutual labels:  openstack, rancher
Terraform Openstack Rke
Terraform Openstack RKE
Stars: ✭ 23 (-39.47%)
Mutual labels:  openstack, kubernetes-deployment
crowbar-core
Core deployment for Crowbar
Stars: ✭ 16 (-57.89%)
Mutual labels:  openstack
kubernetes-starterkit
A launchpad for developers to learn Kubernetes from scratch and deployment of microservices on a kubernetes cluster.
Stars: ✭ 39 (+2.63%)
Mutual labels:  kubernetes-deployment
terraform-aws-cloudwatch-logs
Terraform Module to Provide a CloudWatch Logs Endpoint
Stars: ✭ 59 (+55.26%)
Mutual labels:  terraform-module
a-universe-from-nothing
Kayobe configuration for the Kayobe workshop "A Universe from Nothing: Containerised OpenStack deployment using Kolla, Ansible and Kayobe"
Stars: ✭ 57 (+50%)
Mutual labels:  openstack
django-on-k8s
An end to end tutorial to run a Django Web Application having a PostgreSQL database in Kubernetes
Stars: ✭ 37 (-2.63%)
Mutual labels:  kubernetes-deployment
masterclass-codeexamples
Code examples used in Get into DevOps: The Masterclass
Stars: ✭ 35 (-7.89%)
Mutual labels:  openstack
c3os
Management multiple CloudOS.
Stars: ✭ 14 (-63.16%)
Mutual labels:  openstack
dashboard
The Rancher UI
Stars: ✭ 264 (+594.74%)
Mutual labels:  rancher
tricks
Run experiments effortlessly on top of Kubernetes
Stars: ✭ 24 (-36.84%)
Mutual labels:  kubernetes-deployment
terraform-aws-eks-workers
Terraform module to provision an AWS AutoScaling Group, IAM Role, and Security Group for EKS Workers
Stars: ✭ 82 (+115.79%)
Mutual labels:  terraform-module
xxcloud
xxcloud,旨在整合数据中心异构虚拟化资源为统一的资源池,并在资源池上为用户提供各类IAAS、PAAS服务。
Stars: ✭ 64 (+68.42%)
Mutual labels:  openstack
terraform-aws-bastion-ssm-iam
AWS Bastion server which can reside in the private subnet utilizing Systems Manager Sessions
Stars: ✭ 26 (-31.58%)
Mutual labels:  terraform-module
AsyncOpenStackClient
Asyncio wrapper to OpenStack API
Stars: ✭ 17 (-55.26%)
Mutual labels:  openstack

terraform-openstack-rke2

Terraform Registry test-fast test-full

Terraform module to deploy Kubernetes with RKE2 on OpenStack.

Unlike RKE version this module is not opinionated and let you configure everything via RKE2 configuration file.

Prerequisites

Features

  • HA controlplane
  • Multiple agent node pools
  • Upgrade mechanism

Examples

See examples directory.

Documentation

See USAGE.md for all available options.

Keypair

You can either specify a ssh key file to generate new keypair via ssh_key_file (default) or specify already existent keypair via ssh_keypair_name.

⚠️ Default config will try to use ssh agent for ssh connections to the nodes. Add use_ssh_agent = false if you don't use it.

Secgroup

You can define your own rules (e.g. limiting port 22 and 6443 to admin box).

secgroup_rules      = [ { "source" = "x.x.x.x", "protocol" = "tcp", "port" = 22 },
                        { "source" = "x.x.x.x", "protocol" = "tcp", "port" = 6443 },
                        { "source" = "0.0.0.0/0", "protocol" = "tcp", "port" = 80 },
                        { "source" = "0.0.0.0/0", "protocol" = "tcp", "port" = 443}
                      ]

Nodes affinity

You can set affinity policy for controlplane and each nodes pool server_group_affinity. Default is soft-anti-affinity.

⚠️ soft-anti-affinity and soft-affinity needs Compute service API 2.15 or above.

Boot from volume

Some providers require to boot the instances from an attached boot volume instead of the nova ephemeral volume. To enable this feature, provide the variables to the config file. You can use different value for server and agent nodes.

boot_from_volume = true
boot_volume_size = 20
boot_volume_type = "rbd-1"

Kubernetes version

You can specify rke2 version with rke2_version variables. Refer to RKE2 supported version.

Upgrade by setting the target version via rke2_version and do_upgrade = true. It will upgrade the nodes one-by-one, server nodes first.

⚠️ In-place upgrade mechanism is not battle-tested and relies on Terraform provisioners.

Addons

Set the manifests_path variable to point out the directory containing your manifests and HelmChart (see JupyterHub example).

If you need a template step for your manifests, you can use manifests_gzb64 (see cinder-csi-plugin example).

⚠️ Modifications made to manifests after cluster deployement wont have any effect.

Downscale

You need to manually drain and remove node before downscaling a pool nodes.

Usage with Terraform Kubernetes Provider and Helm Provider

You can tell the module to output kubernetes config by setting output_kubernetes_config = true.

⚠️ Interpolating provider variables from module output is not the recommended way to achieve integration. See here and here.

Use of a data sources is recommended.

(Not recommended) You can use this module to populate Terraform Kubernetes Provider :

provider "kubernetes" {
  host     = module.controlplane.kubernetes_config.host
  client_certificate     = module.controlplane.kubernetes_config.client_certificate
  client_key             = module.controlplane.kubernetes_config.client_key
  cluster_ca_certificate = module.controlplane.kubernetes_config.cluster_ca_certificate
}

Recommended way needs two apply operations, and setting the proper terraform_remote_state data source :

provider "kubernetes" {
  host     = data.terraform_remote_state.rke2.outputs.kubernetes_config.host
  client_certificate     = data.terraform_remote_state.rke2.outputs.kubernetes_config.client_certificate
  client_key             = data.terraform_remote_state.rke2.outputs.kubernetes_config.client_key
  cluster_ca_certificate = data.terraform_remote_state.rke2.outputs.kubernetes_config.cluster_ca_certificate
}

Availability Zones

Changes to a module's availability_zones will intentionally not cause the recreation of instances. You must manually taint the module.controlplane.module.server.openstack_compute_instance_v2.instance for force the recreation of the resource.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].