Skip to content

Commit 2514677

Browse files
committed
update readme to remove jq
1 parent 12490b3 commit 2514677

File tree

6 files changed

+5
-18
lines changed

6 files changed

+5
-18
lines changed

_examples/aks/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ terraform apply
2828
This example generates a kubeconfig file in the current working directory, which can be used for manual CLI access to the cluster.
2929

3030
```
31-
export KUBECONFIG=$(terraform output kubeconfig_path|jq -r)
31+
export KUBECONFIG=$(terraform output -raw kubeconfig_path)
3232
kubectl get pods -n test
3333
```
3434

3535
However, in a real-world scenario, this config file would have to be replaced periodically as the AKS client certificates eventually expire (see the [Azure documentation](https://docs.microsoft.com/en-us/azure/aks/certificate-rotation) for the exact expiry dates). If the certificates (or other authentication attributes) are replaced, run `terraform apply` to pull in the new credentials.
3636

3737
```
3838
terraform apply
39-
export KUBECONFIG=$(terraform output kubeconfig_path|jq -r)
39+
export KUBECONFIG=$(terraform output -raw kubeconfig_path)
4040
kubectl get pods -n test
4141
```
4242

_examples/aks/aks-cluster/output.tf

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ output "ca_cert" {
1010
value = azurerm_kubernetes_cluster.test.kube_config.0.cluster_ca_certificate
1111
}
1212

13-
output "data_disk_uri" {
14-
value = azurerm_managed_disk.test.id
15-
}
16-
1713
output "endpoint" {
1814
value = azurerm_kubernetes_cluster.test.kube_config.0.host
1915
}
Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
#variable "client_cert" {
2-
# type = string
3-
#}
4-
#
51
variable "cluster_name" {
62
type = string
73
}
8-
9-
variable "data_disk_uri" {
10-
type = string
11-
}

_examples/aks/main.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,4 @@ module "kubernetes-config" {
4747
depends_on = [module.aks-cluster]
4848
source = "./kubernetes-config"
4949
cluster_name = local.cluster_name
50-
data_disk_uri = module.aks-cluster.data_disk_uri
5150
}

_examples/eks/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ This example generates a kubeconfig file in the current working directory. Howev
2929

3030
```
3131
terraform apply
32-
export KUBECONFIG=$(terraform output kubeconfig_path|jq -r)
32+
export KUBECONFIG=$(terraform output -raw kubeconfig_path)
3333
kubectl get pods -n test
3434
```
3535

_examples/gke/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,14 @@ This example generates a kubeconfig file in the current working directory. Howev
5353

5454
```
5555
terraform apply
56-
export KUBECONFIG=$(terraform output kubeconfig_path|jq -r)
56+
export KUBECONFIG=$(terraform output -raw kubeconfig_path)
5757
kubectl get pods -n test
5858
```
5959

6060
Alternatively, a longer-lived configuration can be generated using the gcloud tool. Note: this command will overwrite the default kubeconfig at `$HOME/.kube/config`.
6161

6262
```
63-
gcloud container clusters get-credentials $(terraform output cluster_name|jq -r) --zone $(terraform output google_zone |jq -r)
63+
gcloud container clusters get-credentials $(terraform output -raw cluster_name) --zone $(terraform output -raw google_zone)
6464
kubectl get pods -n test
6565
```
6666

0 commit comments

Comments
 (0)