Terraform Kubernetes: kubernetes storage class v1

From wikieduonline
Revision as of 09:06, 20 March 2023 by Newworld3 (talk | contribs)
Jump to navigation Jump to search
kubernetes_storage_class_v1

Official example

resource "kubernetes_storage_class" "example" {
  metadata {
    name = "terraform-example"
  }
  storage_provisioner = "kubernetes.io/gce-pd"
  reclaim_policy      = "Retain"
  parameters = {
    type = "pd-standard"
  }
  mount_options = ["file_mode=0700", "dir_mode=0777", "mfsymlinks", "uid=1000", "gid=1000", "nobrl", "cache=none"]
}


Errors

╷ 
│ Error: Post "http://localhost/apis/storage.k8s.io/v1/storageclasses": dial tcp [::1]:80: connect: 
connection refused
│
│   with module.eks.kubernetes_storage_class_v1.this,
│   on .terraform/modules/eks/main.tf line 111, in resource "kubernetes_storage_class_v1" "this":
│  111:   resource "kubernetes_storage_class_v1" "this" {
│
╵


Advertising: