terraform-kubernetes-installer
terraform-kubernetes-installer copied to clipboard
Error using master branch and oci provider 3.5
Terraform Version
$ terraform -v Terraform v0.11.10
- provider.null v1.0.0
- provider.oci v3.5.0
- provider.random v2.0.0
- provider.template v1.0.0
- provider.tls v1.2.0
OCI Provider Version
.terraform/plugins/darwin_amd64/terraform-provider-oci_v3.5.0_x4 2018/11/01 23:32:50 [INFO] terraform-provider-oci 3.5.0 This binary is a plugin. These are not meant to be executed directly. Please execute the program that consumes these plugins, which will load any plugins automatically
Terraform Installer for Kubernetes Version
Input Variables
OCI authentication
tenancy_ocid = "ocid1.tenancy.oc1..aaaaaaaaovm7qsiumvw3en6azsen2hpaaefgyjesvjjwq7fghfyfpovxocua" compartment_ocid = "ocid1.compartment.oc1..aaaaaaaarxklmiige42bnwqtx7kl7tyqsvkliid6bfzuivuofkjy2rvku3ma" fingerprint = "xxxx" private_key_path = "xxx" user_ocid = "ocid1.user.oc1..aaaaaaaa5wkoqflbrnvylwu7fnozsz227gc6lo47of4htcdv24i6tqcyzzsa" region = "us-ashburn-1"
CCM user
cloud_controller_user_ocid = "ocid1.compartment.oc1..aaaaaaaarxklmiige42bnwqtx7kl7tyqsvkliid6bfzuivuofkjy2rvku3ma" cloud_controller_user_fingerprint = "xxxxx" cloud_controller_user_private_key_path = "xxxxx"
etcdShape = "VM.Standard1.2" k8sMasterShape = "VM.Standard2.2" k8sWorkerShape = "VM.Standard2.1"
etcdAd1Count = "1" etcdAd2Count = "1" etcdAd3Count = "0"
k8sMasterAd1Count = "1" k8sMasterAd2Count = "1" k8sMasterAd3Count = "1"
k8sWorkerAd1Count = "1" k8sWorkerAd2Count = "1" k8sWorkerAd3Count = "1"
etcdLBShape = "100Mbps" k8sMasterLBShape = "100Mbps"
etcd_ssh_ingress = "10.0.0.0/16" etcd_ssh_ingress = "0.0.0.0/0" etcd_cluster_ingress = "10.0.0.0/16" master_ssh_ingress = "0.0.0.0/0" worker_ssh_ingress = "0.0.0.0/0" master_https_ingress = "0.0.0.0/0" worker_nodeport_ingress = "0.0.0.0/0" worker_nodeport_ingress = "10.0.0.0/16"
#control_plane_subnet_access = "public" k8s_master_lb_access = "public" #natInstanceShape = "VM.Standard1.2" #nat_instance_ad1_enabled = "true" #nat_instance_ad2_enabled = "false" #nat_instance_ad3_enabled = "true" #nat_ssh_ingress = "0.0.0.0/0" #public_subnet_http_ingress = "0.0.0.0/0" #public_subnet_https_ingress = "0.0.0.0/0"
#worker_iscsi_volume_create is a bool not a string #worker_iscsi_volume_create = true #worker_iscsi_volume_size = 100
#etcd_iscsi_volume_create = true #etcd_iscsi_volume_size = 50
Description of issue:
Using latest version (master branch) and almost default values, I get the following error
Error: Error applying plan:
3 error(s) occurred:
-
module.etcd-lb.oci_load_balancer_listener.port-2380: 1 error(s) occurred:
-
oci_load_balancer_listener.port-2380: Service error:InvalidParameter. defaultBackendSetName size must be between 1 and 32. http status code: 400. Opc request id: 7b699c14346e11be0ba290889bd7e9d4/091D3AE85AA53AD923587CD3E8AB3929/8D2509F2A799CAC9253F603C053D873B
-
module.etcd-lb.oci_load_balancer_listener.port-2379: 1 error(s) occurred:
-
oci_load_balancer_listener.port-2379: Service error:InvalidParameter. defaultBackendSetName size must be between 1 and 32. http status code: 400. Opc request id: 4601d7f1b58f1e6ca19670e27725a2b0/FD55CC2B32B89778C63EC414718F89CB/B78EEFA19682DABB9F6FAEB6A24335F2
-
module.k8smaster-public-lb.oci_load_balancer_listener.port-https: 1 error(s) occurred:
-
oci_load_balancer_listener.port-https: Service error:InvalidParameter. defaultBackendSetName size must be between 1 and 32. http status code: 400. Opc request id: 775cf45bcae753092cb38596b6b7ac18/BA3062B16CE7A4066032222859B726E4/39DC78CCFEED13F65F197F322C6264D7
There is a fix provided by Raghavendra Prasad
In network/loadbalancers/k8smaster/main.tf change this :
resource "oci_load_balancer_listener" "port-https" {
count = "${var.master_oci_lb_enabled == "true" ? 1 : 0 }"
load_balancer_id = "${oci_load_balancer.lb-k8smaster.id}"
name = "port-https"
default_backend_set_name = "${oci_load_balancer_backendset.lb-k8smaster-https.name}"
port = 443
protocol = "TCP"
}
and network/loadbalancers/etcd/main.tf:
change default_backend_set_name to reference name instead of id.
See https://github.com/oracle/terraform-kubernetes-installer/commit/48cffc8b35da4c82395b7717553f45bac0ab4023