{"id":33998,"date":"2024-08-16T09:27:32","date_gmt":"2024-08-16T07:27:32","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/?p=33998"},"modified":"2024-08-16T09:27:35","modified_gmt":"2024-08-16T07:27:35","slug":"cloudnativepg-connecting-external-applications","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/cloudnativepg-connecting-external-applications\/","title":{"rendered":"CloudNativePG \u2013 Connecting external applications"},"content":{"rendered":"\n<p>Now that we know how we can <a href=\"https:\/\/www.dbi-services.com\/blog\/cloudnativepg-benchmarking\/\" target=\"_blank\" rel=\"noreferrer noopener\">benchmark a CloudNativePG<\/a> deployment, it is time to look at how we can connect external applications to the PostgreSQL cluster. Usually, applications run in the same Kubernetes cluster and can directly talk to our PostgreSQL deployment, but sometimes it is required to also connect with external applications or services. By default, this does not work, as nothing is exposed externally.<\/p>\n\n\n\n<p>You can easily check this by looking at the services we currently have:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; highlight: [1]; title: ; notranslate\" title=\"\">\nk8s@k8s1:~$ kubectl get services -n default\nNAME               TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)    AGE\nkubernetes         ClusterIP   10.96.0.1        &lt;none&gt;        443\/TCP    32d\nmy-pg-cluster-r    ClusterIP   10.107.190.52    &lt;none&gt;        5432\/TCP   8d\nmy-pg-cluster-ro   ClusterIP   10.109.169.21    &lt;none&gt;        5432\/TCP   8d\nmy-pg-cluster-rw   ClusterIP   10.103.171.191   &lt;none&gt;        5432\/TCP   8d\n<\/pre><\/div>\n\n\n<p>There are IP addresses and services for all pods in the cluster, but those addresses are only available inside the cluster. For the external IP addresses there is &#8220;&lt;none&gt;&#8221; for all of them. <\/p>\n\n\n\n<p>Before we make those services available externally, lets quickly check what they mean:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>my-pg-cluster-r: Connects to any of the nodes for read only operations<\/li>\n\n\n\n<li>my-pg-cluster-ro: Connects always to a read only replica (hot standby)<\/li>\n\n\n\n<li>my-pg-cluster-rw: Connects always to the primary node<\/li>\n<\/ul>\n\n\n\n<p>Whatever connects to the cluster, should us one of those services and never connect to a PostreSQL instance directly. The reason is, that those services are managed by the operator and you should rely on the internal Kubernetes DNS for connecting to the cluster services.<\/p>\n\n\n\n<p>What we need to expose the PostgreSQL cluster services is an <a href=\"https:\/\/kubernetes.io\/docs\/concepts\/services-networking\/ingress\/\" target=\"_blank\" rel=\"noreferrer noopener\">Ingress<\/a>, and an <a href=\"https:\/\/kubernetes.io\/docs\/concepts\/services-networking\/ingress-controllers\/\" target=\"_blank\" rel=\"noreferrer noopener\">Ingress Controller<\/a> on top of that in combination with a <a href=\"https:\/\/kubernetes.io\/docs\/concepts\/services-networking\/ingress\/#load-balancing\" target=\"_blank\" rel=\"noreferrer noopener\">load balancer<\/a>. <\/p>\n\n\n\n<p>One of the quite popular Ingress Controllers is the <a href=\"https:\/\/kubernetes.github.io\/ingress-nginx\/\" target=\"_blank\" rel=\"noreferrer noopener\">Ingress-Nginx Controller<\/a>, and this is the one we&#8217;re going to use here as well. Getting this installed, can again easily be done by using <a href=\"https:\/\/helm.sh\/\" target=\"_blank\" rel=\"noreferrer noopener\">Helm<\/a>, in pretty much the same way as we did it with <a href=\"https:\/\/www.dbi-services.com\/blog\/cloudnativepg-storage\/\" target=\"_blank\" rel=\"noreferrer noopener\">OpenEBS in the storage post<\/a>, but before we&#8217;re going to deploy the <a href=\"https:\/\/metallb.universe.tf\/\">METALLB<\/a> load balancer:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; highlight: [1]; title: ; notranslate\" title=\"\">\nk8s@k8s1:~$ helm install metallb metallb\/metallb --namespace metallb-system --create-namespace\nNAME: metallb\nLAST DEPLOYED: Fri Aug  9 09:43:03 2024\nNAMESPACE: metallb-system\nSTATUS: deployed\nREVISION: 1\nTEST SUITE: None\nNOTES:\nMetalLB is now running in the cluster.\n\nNow you can configure it via its CRs. Please refer to the metallb official docs\non how to use the CRs.\n<\/pre><\/div>\n\n\n<p>This creates a new namespace called &#8220;metalllb-system&#8221; and a few pods:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; highlight: [1]; title: ; notranslate\" title=\"\">\nk8s@k8s1:~$ kubectl get pods -A | grep metal\nmetallb-system         metallb-controller-77cb7f5d88-hxndw                     1\/1     Running                0               26s\nmetallb-system         metallb-speaker-5phx6                                   4\/4     Running                0               26s\nmetallb-system         metallb-speaker-bjdxj                                   4\/4     Running                0               26s\nmetallb-system         metallb-speaker-c54z6                                   4\/4     Running                0               26s\nmetallb-system         metallb-speaker-xzphl                                   4\/4     Running                0               26s\n<\/pre><\/div>\n\n\n<p>The next step is to create the Ingress-Nginx Controller: <\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; highlight: [1]; title: ; notranslate\" title=\"\">\nk8s@k8s1:~$ helm upgrade --install ingress-nginx ingress-nginx --repo https:\/\/kubernetes.github.io\/ingress-nginx --namespace ingress-nginx --create-namespace\nRelease &quot;ingress-nginx&quot; does not exist. Installing it now.\nNAME: ingress-nginx\nLAST DEPLOYED: Fri Aug  9 09:49:43 2024\nNAMESPACE: ingress-nginx\nSTATUS: deployed\nREVISION: 1\nTEST SUITE: None\nNOTES:\nThe ingress-nginx controller has been installed.\nIt may take a few minutes for the load balancer IP to be available.\nYou can watch the status by running &#039;kubectl get service --namespace ingress-nginx ingress-nginx-controller --output wide --watch&#039;\n\nAn example Ingress that makes use of the controller:\n  apiVersion: networking.k8s.io\/v1\n  kind: Ingress\n  metadata:\n    name: example\n    namespace: foo\n  spec:\n    ingressClassName: nginx\n    rules:\n      - host: www.example.com\n        http:\n          paths:\n            - pathType: Prefix\n              backend:\n                service:\n                  name: exampleService\n                  port:\n                    number: 80\n              path: \/\n    # This section is only required if TLS is to be enabled for the Ingress\n    tls:\n      - hosts:\n        - www.example.com\n        secretName: example-tls\n\nIf TLS is enabled for the Ingress, a Secret containing the certificate and key must also be provided:\n\n  apiVersion: v1\n  kind: Secret\n  metadata:\n    name: example-tls\n    namespace: foo\n  data:\n    tls.crt: &lt;base64 encoded cert&gt;\n    tls.key: &lt;base64 encoded key&gt;\n  type: kubernetes.io\/tls\n\n<\/pre><\/div>\n\n\n<p>Same story here, we get a new namespace:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; highlight: [1]; title: ; notranslate\" title=\"\">\nk8s@k8s1:~$ kubectl get pods -n ingress-nginx\nNAME                                        READY   STATUS    RESTARTS   AGE\ningress-nginx-controller-69bd47995d-krt7h   1\/1     Running   0          2m33s\n<\/pre><\/div>\n\n\n<p>At this stage, you&#8217;ll notice that we still do not have any services exposed externally ( we still see &#8220;&lt;pending&gt;&#8221; for the EXTERNAL-IP):<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; highlight: [1]; title: ; notranslate\" title=\"\">\nk8s@k8s1:~$ kubectl get svc -A | grep nginx\ningress-nginx          ingress-nginx-controller               LoadBalancer   10.109.240.37    &lt;pending&gt;     80:31719\/TCP,443:32412\/TCP                              103s\ningress-nginx          ingress-nginx-controller-admission     ClusterIP      10.103.255.169   &lt;none&gt;        443\/TCP                                                 103s\n<\/pre><\/div>\n\n\n<p>This is not a big surprise, as we did not tell the load balancer which IP addresses to request\/assign. This is done easily:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; highlight: [1,21,24]; title: ; notranslate\" title=\"\">\nk8s@k8s1:~$ cat lb.yaml \n---\napiVersion: metallb.io\/v1beta1\nkind: IPAddressPool\nmetadata:\n  name: default\n  namespace: metallb-system\nspec:\n  addresses:\n  - 192.168.122.210-192.168.122.215\n  autoAssign: true\n---\napiVersion: metallb.io\/v1beta1\nkind: L2Advertisement\nmetadata:\n  name: default\n  namespace: metallb-system\nspec:\n  ipAddressPools:\n  - default\nk8s@k8s1:~$ kubectl apply -f lb.yaml \nipaddresspool.metallb.io\/default created\nl2advertisement.metallb.io\/default created\nk8s@k8s1:~$ kubectl get services -n ingress-nginx \nNAME                                 TYPE           CLUSTER-IP       EXTERNAL-IP       PORT(S)                      AGE\ningress-nginx-controller             LoadBalancer   10.109.240.37    192.168.122.210   80:31719\/TCP,443:32412\/TCP   3m32s\ningress-nginx-controller-admission   ClusterIP      10.103.255.169   &lt;none&gt;            443\/TCP                      3m32s\n<\/pre><\/div>\n\n\n<p>From now on the LoadBalancer got an IP address automatically assigned from the pool of addresses we&#8217;ve assigned. The next steps are covered in the <a href=\"https:\/\/cloudnative-pg.io\/documentation\/1.23\/expose_pg_services\/\">CloudNativePG<\/a> documentation: First we need a config map for the service we want to expose:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; highlight: [1,10]; title: ; notranslate\" title=\"\">\nk8s@k8s1:~$ cat tcp-services-configmap.yaml \napiVersion: v1\nkind: ConfigMap\nmetadata:\n  name: tcp-services\n  namespace: ingress-nginx\ndata:\n  5432: default\/my-pg-cluster-rw:5432\n\nk8s@k8s1:~$ kubectl apply -f tcp-services-configmap.yaml\nconfigmap\/tcp-services created\nk8s@k8s1:~$ kubectl get cm -n ingress-nginx\nNAME                       DATA   AGE\ningress-nginx-controller   1      6m4s\nkube-root-ca.crt           1      6m8s\ntcp-services               1      12s\n<\/pre><\/div>\n\n\n<p>Now we need to modify the ingress-nginx service to include the new port:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; highlight: [1,28,30]; title: ; notranslate\" title=\"\">\nk8s@k8s1:~$ kubectl get svc ingress-nginx-controller -n ingress-nginx -o yaml &gt; service.yaml\nk8s@k8s1:~$ vi service.yaml \n...\n  ports:\n  - appProtocol: http\n    name: http\n    nodePort: 31719\n    port: 80\n    protocol: TCP\n    targetPort: http\n  - appProtocol: https\n    name: https\n    nodePort: 32412\n    port: 443\n    protocol: TCP\n    targetPort: https\n  - appProtocol: tcp\n    name: postgres\n    port: 5432\n    targetPort: 5432\n...\nk8s@k8s1:~$ kubectl apply -f service.yaml\nWarning: resource services\/ingress-nginx-controller is missing the kubectl.kubernetes.io\/last-applied-configuration annotation which is required by kubectl apply. kubectl apply should only be used on resources created declaratively by either kubectl create --save-config or kubectl apply. The missing annotation will be patched automatically.\nservice\/ingress-nginx-controller configured\n<\/pre><\/div>\n\n\n<p>The last step is to link our config map into the &#8220;ingress-nginx-controller&#8221; deployment:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; highlight: [1,12]; title: ; notranslate\" title=\"\">\nk8s@k8s1:~$ kubectl edit deploy ingress-nginx-controller -n ingress-nginx\n...\n    spec:\n      containers:\n      - args:\n        - \/nginx-ingress-controller\n        - --publish-service=$(POD_NAMESPACE)\/ingress-nginx-controller\n        - --election-id=ingress-nginx-leader\n        - --controller-class=k8s.io\/ingress-nginx\n        - --ingress-class=nginx\n        - --configmap=$(POD_NAMESPACE)\/ingress-nginx-controller\n        - --tcp-services-configmap=ingress-nginx\/tcp-services\n        - --validating-webhook=:8443\n        - --validating-webhook-certificate=\/usr\/local\/certificates\/cert\n        - --validating-webhook-key=\/usr\/local\/certificates\/key\n        - --enable-metrics=false\n...\n<\/pre><\/div>\n\n\n<p>From now on the PostgreSQL cluster can be reached from outside the Kubernetes cluster:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; highlight: [1,5]; title: ; notranslate\" title=\"\">\nk8s@k8s1:~$ kubectl get svc -n ingress-nginx\nNAME                                 TYPE           CLUSTER-IP       EXTERNAL-IP       PORT(S)                                     AGE\ningress-nginx-controller             LoadBalancer   10.109.240.37    192.168.122.210   80:31719\/TCP,443:32412\/TCP,5432:32043\/TCP   6d23h\ningress-nginx-controller-admission   ClusterIP      10.103.255.169   &lt;none&gt;            443\/TCP                                     6d23h\nk8s@k8s1:~$ psql -h 192.168.122.210 \nPassword for user k8s: \npsql: error: connection to server at &quot;192.168.122.210&quot;, port 5432 failed: FATAL:  password authentication failed for user &quot;k8s&quot;\nconnection to server at &quot;192.168.122.210&quot;, port 5432 failed: FATAL:  password authentication failed for user &quot;k8s&quot;\n\n<\/pre><\/div>","protected":false},"excerpt":{"rendered":"<p>Now that we know how we can benchmark a CloudNativePG deployment, it is time to look at how we can connect external applications to the PostgreSQL cluster. Usually, applications run in the same Kubernetes cluster and can directly talk to our PostgreSQL deployment, but sometimes it is required to also connect with external applications or [&hellip;]<\/p>\n","protected":false},"author":29,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[955,229,198,1320],"tags":[77],"type_dbi":[],"class_list":["post-33998","post","type-post","status-publish","format-standard","hentry","category-cloud","category-database-administration-monitoring","category-database-management","category-devops","tag-postgresql"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.5) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>CloudNativePG \u2013 Connecting external applications - dbi Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/cloudnativepg-connecting-external-applications\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"CloudNativePG \u2013 Connecting external applications\" \/>\n<meta property=\"og:description\" content=\"Now that we know how we can benchmark a CloudNativePG deployment, it is time to look at how we can connect external applications to the PostgreSQL cluster. Usually, applications run in the same Kubernetes cluster and can directly talk to our PostgreSQL deployment, but sometimes it is required to also connect with external applications or [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/cloudnativepg-connecting-external-applications\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2024-08-16T07:27:32+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-08-16T07:27:35+00:00\" \/>\n<meta name=\"author\" content=\"Daniel Westermann\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@westermanndanie\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Daniel Westermann\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/cloudnativepg-connecting-external-applications\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/cloudnativepg-connecting-external-applications\\\/\"},\"author\":{\"name\":\"Daniel Westermann\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/8d08e9bd996a89bd75c0286cbabf3c66\"},\"headline\":\"CloudNativePG \u2013 Connecting external applications\",\"datePublished\":\"2024-08-16T07:27:32+00:00\",\"dateModified\":\"2024-08-16T07:27:35+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/cloudnativepg-connecting-external-applications\\\/\"},\"wordCount\":451,\"commentCount\":0,\"keywords\":[\"PostgreSQL\"],\"articleSection\":[\"Cloud\",\"Database Administration &amp; Monitoring\",\"Database management\",\"DevOps\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/cloudnativepg-connecting-external-applications\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/cloudnativepg-connecting-external-applications\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/cloudnativepg-connecting-external-applications\\\/\",\"name\":\"CloudNativePG \u2013 Connecting external applications - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\"},\"datePublished\":\"2024-08-16T07:27:32+00:00\",\"dateModified\":\"2024-08-16T07:27:35+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/8d08e9bd996a89bd75c0286cbabf3c66\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/cloudnativepg-connecting-external-applications\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/cloudnativepg-connecting-external-applications\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/cloudnativepg-connecting-external-applications\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"CloudNativePG \u2013 Connecting external applications\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/8d08e9bd996a89bd75c0286cbabf3c66\",\"name\":\"Daniel Westermann\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/31350ceeecb1dd8986339a29bf040d4cd3cd087d410deccd8f55234466d6c317?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/31350ceeecb1dd8986339a29bf040d4cd3cd087d410deccd8f55234466d6c317?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/31350ceeecb1dd8986339a29bf040d4cd3cd087d410deccd8f55234466d6c317?s=96&d=mm&r=g\",\"caption\":\"Daniel Westermann\"},\"description\":\"Daniel Westermann is Principal Consultant and Technology Leader Open Infrastructure at dbi services. He has more than 15 years of experience in management, engineering and optimization of databases and infrastructures, especially on Oracle and PostgreSQL. Since the beginning of his career, he has specialized in Oracle Technologies and is Oracle Certified Professional 12c and Oracle Certified Expert RAC\\\/GridInfra. Over time, Daniel has become increasingly interested in open source technologies, becoming \u201cTechnology Leader Open Infrastructure\u201d and PostgreSQL expert. \u00a0Based on community or EnterpriseDB tools, he develops and installs complex high available solutions with PostgreSQL. He is also a certified PostgreSQL Plus 9.0 Professional and a Postgres Advanced Server 9.4 Professional. He is a regular speaker at PostgreSQL conferences in Switzerland and Europe. Today Daniel is also supporting our customers on AWS services such as AWS RDS, database migrations into the cloud, EC2 and automated infrastructure management with AWS SSM (System Manager). He is a certified AWS Solutions Architect Professional. Prior to dbi services, Daniel was Management System Engineer at LC SYSTEMS-Engineering AG in Basel. Before that, he worked as Oracle Developper &amp;\u00a0Project Manager at Delta Energy Solutions AG in Basel (today Powel AG). Daniel holds a diploma in Business Informatics (DHBW, Germany). His branch-related experience mainly covers the pharma industry, the financial sector, energy, lottery and telecommunications.\",\"sameAs\":[\"https:\\\/\\\/x.com\\\/westermanndanie\"],\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/author\\\/daniel-westermann\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"CloudNativePG \u2013 Connecting external applications - dbi Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/cloudnativepg-connecting-external-applications\/","og_locale":"en_US","og_type":"article","og_title":"CloudNativePG \u2013 Connecting external applications","og_description":"Now that we know how we can benchmark a CloudNativePG deployment, it is time to look at how we can connect external applications to the PostgreSQL cluster. Usually, applications run in the same Kubernetes cluster and can directly talk to our PostgreSQL deployment, but sometimes it is required to also connect with external applications or [&hellip;]","og_url":"https:\/\/www.dbi-services.com\/blog\/cloudnativepg-connecting-external-applications\/","og_site_name":"dbi Blog","article_published_time":"2024-08-16T07:27:32+00:00","article_modified_time":"2024-08-16T07:27:35+00:00","author":"Daniel Westermann","twitter_card":"summary_large_image","twitter_creator":"@westermanndanie","twitter_misc":{"Written by":"Daniel Westermann","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/cloudnativepg-connecting-external-applications\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/cloudnativepg-connecting-external-applications\/"},"author":{"name":"Daniel Westermann","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d08e9bd996a89bd75c0286cbabf3c66"},"headline":"CloudNativePG \u2013 Connecting external applications","datePublished":"2024-08-16T07:27:32+00:00","dateModified":"2024-08-16T07:27:35+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/cloudnativepg-connecting-external-applications\/"},"wordCount":451,"commentCount":0,"keywords":["PostgreSQL"],"articleSection":["Cloud","Database Administration &amp; Monitoring","Database management","DevOps"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/cloudnativepg-connecting-external-applications\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/cloudnativepg-connecting-external-applications\/","url":"https:\/\/www.dbi-services.com\/blog\/cloudnativepg-connecting-external-applications\/","name":"CloudNativePG \u2013 Connecting external applications - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"datePublished":"2024-08-16T07:27:32+00:00","dateModified":"2024-08-16T07:27:35+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d08e9bd996a89bd75c0286cbabf3c66"},"breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/cloudnativepg-connecting-external-applications\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/cloudnativepg-connecting-external-applications\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/cloudnativepg-connecting-external-applications\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"CloudNativePG \u2013 Connecting external applications"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d08e9bd996a89bd75c0286cbabf3c66","name":"Daniel Westermann","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/31350ceeecb1dd8986339a29bf040d4cd3cd087d410deccd8f55234466d6c317?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/31350ceeecb1dd8986339a29bf040d4cd3cd087d410deccd8f55234466d6c317?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/31350ceeecb1dd8986339a29bf040d4cd3cd087d410deccd8f55234466d6c317?s=96&d=mm&r=g","caption":"Daniel Westermann"},"description":"Daniel Westermann is Principal Consultant and Technology Leader Open Infrastructure at dbi services. He has more than 15 years of experience in management, engineering and optimization of databases and infrastructures, especially on Oracle and PostgreSQL. Since the beginning of his career, he has specialized in Oracle Technologies and is Oracle Certified Professional 12c and Oracle Certified Expert RAC\/GridInfra. Over time, Daniel has become increasingly interested in open source technologies, becoming \u201cTechnology Leader Open Infrastructure\u201d and PostgreSQL expert. \u00a0Based on community or EnterpriseDB tools, he develops and installs complex high available solutions with PostgreSQL. He is also a certified PostgreSQL Plus 9.0 Professional and a Postgres Advanced Server 9.4 Professional. He is a regular speaker at PostgreSQL conferences in Switzerland and Europe. Today Daniel is also supporting our customers on AWS services such as AWS RDS, database migrations into the cloud, EC2 and automated infrastructure management with AWS SSM (System Manager). He is a certified AWS Solutions Architect Professional. Prior to dbi services, Daniel was Management System Engineer at LC SYSTEMS-Engineering AG in Basel. Before that, he worked as Oracle Developper &amp;\u00a0Project Manager at Delta Energy Solutions AG in Basel (today Powel AG). Daniel holds a diploma in Business Informatics (DHBW, Germany). His branch-related experience mainly covers the pharma industry, the financial sector, energy, lottery and telecommunications.","sameAs":["https:\/\/x.com\/westermanndanie"],"url":"https:\/\/www.dbi-services.com\/blog\/author\/daniel-westermann\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/33998","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/29"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=33998"}],"version-history":[{"count":19,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/33998\/revisions"}],"predecessor-version":[{"id":34509,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/33998\/revisions\/34509"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=33998"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=33998"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=33998"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=33998"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}