Update kubernetes provider

This commit is contained in:
Seth Vargo 2017-04-10 12:26:41 -04:00
parent d37bf808df
commit ecda27e05a
No known key found for this signature in database
GPG Key ID: C921994F9C27E0FF
4 changed files with 16 additions and 12 deletions

View File

@ -16,7 +16,7 @@ Use the navigation to the left to read about the available resources.
## Example Usage ## Example Usage
``` ```hcl
provider "kubernetes" { provider "kubernetes" {
config_context_auth_info = "ops" config_context_auth_info = "ops"
config_context_cluster = "mycluster" config_context_cluster = "mycluster"
@ -58,11 +58,12 @@ Read [more about `kubectl` in the official docs](https://kubernetes.io/docs/user
The other way is **statically** define all the credentials: The other way is **statically** define all the credentials:
``` ```hcl
provider "kubernetes" { provider "kubernetes" {
host = "https://104.196.242.174" host = "https://104.196.242.174"
username = "ClusterMaster" username = "ClusterMaster"
password = "MindTheGap" password = "MindTheGap"
client_certificate = "${file("~/.kube/client-cert.pem")}" client_certificate = "${file("~/.kube/client-cert.pem")}"
client_key = "${file("~/.kube/client-key.pem")}" client_key = "${file("~/.kube/client-key.pem")}"
cluster_ca_certificate = "${file("~/.kube/cluster-ca-cert.pem")}" cluster_ca_certificate = "${file("~/.kube/cluster-ca-cert.pem")}"

View File

@ -13,11 +13,12 @@ Config Map can be used to store fine-grained information like individual propert
## Example Usage ## Example Usage
``` ```hcl
resource "kubernetes_config_map" "example" { resource "kubernetes_config_map" "example" {
metadata { metadata {
name = "my-config" name = "my-config"
} }
data { data {
api_host = "myhost:443" api_host = "myhost:443"
db_host = "dbhost:5432" db_host = "dbhost:5432"

View File

@ -13,15 +13,17 @@ Read more about namespaces at https://kubernetes.io/docs/user-guide/namespaces/
## Example Usage ## Example Usage
``` ```hcl
resource "kubernetes_namespace" "example" { resource "kubernetes_namespace" "example" {
metadata { metadata {
annotations { annotations {
name = "example-annotation" name = "example-annotation"
} }
labels { labels {
mylabel = "label-value" mylabel = "label-value"
} }
name = "TerraformExampleNamespace" name = "TerraformExampleNamespace"
} }
} }

View File

@ -18,7 +18,7 @@ The resource will by default create a secret which is available to any pod in th
## Example Usage ## Example Usage
``` ```hcl
resource "kubernetes_secret" "example" { resource "kubernetes_secret" "example" {
metadata { metadata {
name = "basic-auth" name = "basic-auth"