Difference between revisions of "Terraform Kubernetes: kubernetes storage class v1"
Jump to navigation
Jump to search
Tags: Mobile web edit, Mobile edit |
Tags: Mobile web edit, Mobile edit |
||
Line 1: | Line 1: | ||
kubernetes_storage_class_v1 | kubernetes_storage_class_v1 | ||
* https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/storage_class | * https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/storage_class | ||
+ | == Official example == | ||
+ | <pre> | ||
+ | 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"] | ||
+ | } | ||
+ | </pre> | ||
+ | |||
+ | == Errors == | ||
╷ | ╷ | ||
│ Error: Post "http://localhost/apis/storage.k8s.io/v1/storageclasses": dial tcp [::1]:80: connect: | │ Error: Post "http://localhost/apis/storage.k8s.io/v1/storageclasses": dial tcp [::1]:80: connect: |
Revision as of 09:06, 20 March 2023
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" { │ ╵
- Terraform provider: Kubernetes,
kubernetes_storage_class_v1, kubernetes_persistent_volume, kubernetes_manifest, kubernetes daemonset, kubernetes_service, kubernetes_namespace, kubernetes_service_account, kubernetes_secret, kubernetes_namespace, kubernetes_service_account_v1, kubernetes_secret_v1, kubernetes horizontal pod autoscaler v1, kubernetes_ingress_v1, kubernetes_persistent_volume_claim_v1
- AWS EKS Addons: best practices,
vpc-cni, kube-proxy, coredns, aws-ebs-csi-driver, aws-efs-csi-driver, aws-guardduty-agent, amazon-cloudwatch-observability, aws eks describe-addon-versions, aws eks create-addon, aws eks list-addons
Advertising: