Final updates

pull/758/head
redsoxfantom 2024-01-29 13:26:26 -05:00
parent 28b60db9fc
commit 498277aaec
3 changed files with 45 additions and 1 deletions

View File

@ -7,7 +7,7 @@ In this lab you will deploy the [DNS add-on](https://kubernetes.io/docs/concepts
Deploy the `coredns` cluster add-on:
```
kubectl apply -f https://storage.googleapis.com/kubernetes-the-hard-way/coredns-1.8.yaml
kubectl apply -f deployments/coredns-1.7.0.yaml
```
> output

View File

@ -15,6 +15,7 @@ kubectl create secret generic kubernetes-the-hard-way \
Print a hexdump of the `kubernetes-the-hard-way` secret stored in etcd:
```gcloud```
```
gcloud compute ssh controller-0 \
--command "sudo ETCDCTL_API=3 etcdctl get \
@ -25,6 +26,17 @@ gcloud compute ssh controller-0 \
/registry/secrets/default/kubernetes-the-hard-way | hexdump -C"
```
```az```
```
ssh -i $HOME/.ssh/k8sthehardway azureuser@$(az vm show -d --name controller-0 --query "publicIps" -o tsv) \
"sudo ETCDCTL_API=3 etcdctl get \
--endpoints=https://127.0.0.1:2379 \
--cacert=/etc/etcd/ca.pem \
--cert=/etc/etcd/kubernetes.pem \
--key=/etc/etcd/kubernetes-key.pem\
/registry/secrets/default/kubernetes-the-hard-way | hexdump -C"
```
> output
```
@ -184,19 +196,39 @@ NODE_PORT=$(kubectl get svc nginx \
Create a firewall rule that allows remote access to the `nginx` node port:
```gcloud```
```
gcloud compute firewall-rules create kubernetes-the-hard-way-allow-nginx-service \
--allow=tcp:${NODE_PORT} \
--network kubernetes-the-hard-way
```
```az```
```
az network nsg rule create \
--name kubernetes-the-hard-way-inbound-smoke-test \
--nsg-name kubernetes-the-hard-way-nsg \
--priority 300 \
--access ALLOW \
--source-address-prefixes 0.0.0.0/0 \
--destination-port-ranges ${NODE_PORT} \
--protocol Tcp \
--direction Inbound
```
Retrieve the external IP address of a worker instance:
```gcloud```
```
EXTERNAL_IP=$(gcloud compute instances describe worker-0 \
--format 'value(networkInterfaces[0].accessConfigs[0].natIP)')
```
```az```
```
EXTERNAL_IP=$(az vm show -d -n worker-0 --query publicIps -o tsv)
```
Make an HTTP request using the external IP address and the `nginx` node port:
```

View File

@ -2,6 +2,7 @@
In this lab you will delete the compute resources created during this tutorial.
```gcloud```
## Compute Instances
Delete the controller and worker compute instances:
@ -61,3 +62,14 @@ Delete the `kubernetes-the-hard-way` compute address:
gcloud -q compute addresses delete kubernetes-the-hard-way \
--region $(gcloud config get-value compute/region)
```
```az```
## Resource Group
Delete the `k8s-the-hard-way` resource group, all other resources will be deleted automatically:
```
az group delete --resource-group k8s-the-hard-way
```
This command takes a while, be patient...