Skip to Content

Connect to a container

test
0 %
Connect to a container
Details
// Explore More Tutorials

Connect to a container

10/17/2018

Beginner
15 min.
Monitor deployment and connect to one of the deployed containers

You will learn

  • How to monitor deployment and check the logs for a container
  • How to connect to the bash console in the SAP HANA, express edition container


Step 1: Check the database has started

Use the following command to make sure the database has finished starting.

kubectl logs deployment/hxe -c hxe-container

You should see the message Startup finished in the logs. If you do not see it, repeat the command in a minute or until startup has completed.

Create a cluster
Log on to answer question
Step 2: Connect to the container

Use the following command to get the name of the pod

kubectl get pods

Use the name of the pod (starting in hxe-) to replace it in the command below

kubectl exec -it <<pod-name>> bash

For example:

Container is started
Log on to answer question
Step 3: Connect to the SQL console
hdbsql -i 90 -d systemdb -u SYSTEM -p HXEHana1

Paste the following command into the SQL prompt

alter database HXE add 'docstore';

Use quit to exit the SQL command line and exit

SQL command
Log on to answer question
Step 4: Connect to SQLPAD

Use the following command to get the services which expose your connections to the database and the SQL client

kubectl get services
How many services do you see with an external IP?
×

Next Steps

Back to top