You're unable to connect an application to a SAP HANA Database instance.
The Istio module's default configuration does not restrict outbound traffic. This means that the application should have no issues connecting to a SAP HANA Database instance. If you are experiencing issues, they may be related to the SAP HANA Database instance or your cluster configuration. To identify the source of the problem, follow the troubleshooting steps.
- Download SAP HANA Client for your operating system from SAP Development Tools.
- Unpack the downloaded archive.
- Install SAP HANA Client.
- To connect to SAP HANA Database instance, use the following command:
For example:
hdbsql -n {HANA_DB_INSTANCE_ADDRESS} -u {HANA_DB_USER} -p {HANA_DB_PASSWORD}
If the connection is successful and you can execute queries, the issue is not related to the SAP HANA Database instance.hdbsql -n aaa.bbb.ccc.ddd:30015 -u my_user -p mypassword
- Build a Docker image with the SAP HANA Client installed. You can use the following Dockerfile:
FROM eclipse-temurin:17 WORKDIR /build COPY client.tar client.tar RUN tar -xvf client.tar RUN echo "/usr/local/bin" | ./client/hdbinst ENTRYPOINT ["sleep", "8000"]
- Download the SAP HANA Client for Linux x86 64-bit from SAP Development Tools and save it as
client.tar
in the same directory as the Dockerfile. - To build the image, run the following command:
docker buildx build --platform=linux/amd64 -t hdbsql .
- To test your image, run the following command:
You get an output similar to this example:
docker run --entrypoint "hdbsql" hdbsql -v
HDBSQL version 2.20.20.1712178305, the SAP HANA Database interactive terminal. Copyright 2000-2024 by SAP SE.
- Publish the image to a container registry.
- Run the image in the Kubernetes cluster:
kubectl create deployment hdbsql --image={PUBLISHED_IMAGE_NAME}
- To attach to the Pod and connect to the SAP HANA Database instance, run the following command:
If the connection is successful and you can execute queries, the issue is not related to the setup of the cluster.
hdbsql -n {HANA_DB_INSTANCE_ADDRESS} -u {HANA_DB_USER} -p {HANA_DB_PASSWORD}
- Check the connection from a Pod that has the Istio sidecar injected. To do this, create a Deployment in a namespace with Istio sidecar injection enabled.