148422597X Kubernetes Management Design Patterns [Vohra 2017-01-29] {E559F6BB}

marco.cirilli
from marco.cirilli More from this publisher
19.06.2021 Views

Chapter 5 ■ Using the Tectonic ConsoleIf the Tectonic Console was installed, output similar to Figure 5-7 should be generated from thepreceding commands.Figure 5-7. Creating a replication controller and pod for Tectonic ConsoleAccessing the Tectonic ConsoleBecause Tectonic Starter does not authenticate users, the interface is not exposed outside the cluster,and port forwarding must be set from the controller machine to the Tectonic Console service port 9000.The following command sets up port forwarding from 127.0.0.1:9000 to port 9000 on the pod labelledapp=tectonic-console:kubectl get pods -l tectonic-app=console -o template --template="{{range.items}}{{.metadata.name}}{{end}}" | xargs -i{} kubectl port-forward {} 9000Port forwarding from the machine from which the preceding command is run, which is the controllerinstance, to the pod on which the container for the Tectonic Console is run, will be set up as shown in Figure 5-8.Figure 5-8. Setting port forwardingTo invoke the Tectonic Console in a web browser we still need to set another port forwarding from alocal machine to the controller machine, which has public IP 23.20.52.23 and public DNS ec2-23-20-52-23.compute-1.amazonaws.com. A port other than 9000 could be used on the local machine to forward to theTectonic Console port. The command looks like this:ssh -i kubernetes-coreos.pem -f -nNT -L 9001:127.0.0.1:9000 core@ec2-23-20-52-23.compute-1.amazonaws.comPort forwarding from the local machine on which the preceding command is run to the controllerinstance is set up. Access the Tectonic Console at URL http://localhost:9001 in a browser on the localmachine as shown in Figure 5-9. The port could be different if a different localhost port is forwarded.123

Chapter 5 ■ Using the Tectonic ConsoleFigure 5-9. Accessing the Tectonic ConsoleUsing the Tectonic ConsoleThe Tectonic Console may be used to view the different Kubernetes objects, such as deployments,replication controllers, replica sets, pods, and services, or to create new Kubernetes objects. To display thedeployments, click the Deployments tab. To create a new deployment, click the Create a New Deploymentlink as shown in Figure 5-10.124

Chapter 5 ■ Using the Tectonic Console

If the Tectonic Console was installed, output similar to Figure 5-7 should be generated from the

preceding commands.

Figure 5-7. Creating a replication controller and pod for Tectonic Console

Accessing the Tectonic Console

Because Tectonic Starter does not authenticate users, the interface is not exposed outside the cluster,

and port forwarding must be set from the controller machine to the Tectonic Console service port 9000.

The following command sets up port forwarding from 127.0.0.1:9000 to port 9000 on the pod labelled

app=tectonic-console:

kubectl get pods -l tectonic-app=console -o template --template="{{range.items}}{{.metadata.

name}}{{end}}" | xargs -i{} kubectl port-forward {} 9000

Port forwarding from the machine from which the preceding command is run, which is the controller

instance, to the pod on which the container for the Tectonic Console is run, will be set up as shown in Figure 5-8.

Figure 5-8. Setting port forwarding

To invoke the Tectonic Console in a web browser we still need to set another port forwarding from a

local machine to the controller machine, which has public IP 23.20.52.23 and public DNS ec2-23-20-52-23.

compute-1.amazonaws.com. A port other than 9000 could be used on the local machine to forward to the

Tectonic Console port. The command looks like this:

ssh -i kubernetes-coreos.pem -f -nNT -L 9001:127.0.0.1:9000 core@ec2-23-20-52-23.compute-1.

amazonaws.com

Port forwarding from the local machine on which the preceding command is run to the controller

instance is set up. Access the Tectonic Console at URL http://localhost:9001 in a browser on the local

machine as shown in Figure 5-9. The port could be different if a different localhost port is forwarded.

123

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!