Verify the Topology
Verify that the resources that you defined in the Terraform configuration are created, test SSH access to the bastion and admin hosts, and verify access to the Kubernetes cluster.
Verify SSH Access to the Bastion and Admin Hosts
If you opted to create a bastion host or an admin host, then test whether you can create an SSH connection to them.
ssh
commands that you copied earlier from the output of the terraform apply
operation.
If you didn't copy the ssh
commands earlier from the output of terraform apply
, then go to the top-level directory that contains the Terraform configuration, and run the command terraform output
. Copy the ssh_to_admin
and ssh_to_bastion
outputs.
ssh
commands are in the following format:
- Admin host:
ssh -i privateKeyPath -J opc@bastionPublicIP opc@adminPrivateIP
- Bastion host:
ssh -i privateKeyPath opc@bastionPublicIP
Access the Kubernetes Cluster
You can use the kubectl
CLI or the web-based Kubernetes dashboard to access and manage the Kubernetes cluster.
kubectl
is installed and configured automatically on the admin host.- To run
kubectl
from your local host, install it, and set theKUBECONFIG
environment variable.The
kubectl
CLI uses theKUBECONFIG
variable to determine the parameters for accessing a Kubernetes cluster. When you applied the Terraform configuration, the required cluster-access parameters were generated and stored in a local file namedkubeconfig
in the directorygenerated
.To set theKUBECONFIG
environment variable on your local host, run the following command:export KUBECONFIG=generated/kubeconfig
- To access the Kubernetes dashboard, complete the following steps:
- Start a proxy server to the Kubernetes API server by running the following command:
kubectl proxy
- Using your browser, go to
http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/
- Start a proxy server to the Kubernetes API server by running the following command: