{"id":309,"date":"2023-07-20T06:24:52","date_gmt":"2023-07-20T06:24:52","guid":{"rendered":"http:\/\/www.adartis.de\/?p=309"},"modified":"2023-07-20T06:24:52","modified_gmt":"2023-07-20T06:24:52","slug":"postgres","status":"publish","type":"post","link":"https:\/\/www.adartis.de\/?p=309","title":{"rendered":"Postgres"},"content":{"rendered":"\n<p class=\"has-text-align-center has-medium-font-size\"><strong>Postgres Cluster Zugriff durch Traefik<\/strong><\/p>\n\n\n\n<p>Um den Cluster au\u00dferhalb der K8s Cluster zuzugreifen, mussen wir zuerst den Port von postgres in Traefik values.yaml definieren.<\/p>\n\n\n\n<p class=\"has-background\" style=\"background-color:#ededed\">postgres:<br>port: 5432<br>expose: true<br>protocol: TCP<br>exposedPort: 5432<\/p>\n\n\n\n<p>Nachdem wir den Traefik helmchart nochmal aktualisiert haben, mussen wir ein IngressRouteTCP f\u00fcr die Postgres cluster definieren.<\/p>\n\n\n\n<div class=\"wp-block-group has-background is-layout-constrained wp-block-group-is-layout-constrained\" style=\"background-color:#ededed\">\n<p>apiVersion: traefik.containo.us\/v1alpha1<br>kind: IngressRouteTCP<br>metadata:<br>name: ingressroutetcpfoo<br>namespace: pg-cluster<br>spec:<br>entryPoints:<br>&#8211; postgres<br>routes:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>match: HostSNI(<code>*<\/code>) services:\n<ul class=\"wp-block-list\">\n<li>name: acid-complete-cluster2<br>port: 5432<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/div>\n\n\n\n<p>Fertig. Jetzt k\u00f6nnen wir die postgres cluster durch PgAdmin unter \u201cpg.apps.rancher.adartish.de\u201c erreichen.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"943\" height=\"1024\" src=\"http:\/\/www.adartis.de\/wp-content\/uploads\/2023\/07\/\u06f2\u06f0\u06f2\u06f3\u06f1\u06f0-943x1024.png\" alt=\"\" class=\"wp-image-310\" srcset=\"https:\/\/www.adartis.de\/wp-content\/uploads\/2023\/07\/\u06f2\u06f0\u06f2\u06f3\u06f1\u06f0-943x1024.png 943w, https:\/\/www.adartis.de\/wp-content\/uploads\/2023\/07\/\u06f2\u06f0\u06f2\u06f3\u06f1\u06f0-276x300.png 276w, https:\/\/www.adartis.de\/wp-content\/uploads\/2023\/07\/\u06f2\u06f0\u06f2\u06f3\u06f1\u06f0-768x834.png 768w, https:\/\/www.adartis.de\/wp-content\/uploads\/2023\/07\/\u06f2\u06f0\u06f2\u06f3\u06f1\u06f0.png 1024w\" sizes=\"auto, (max-width: 943px) 100vw, 943px\" \/><\/figure>\n\n\n\n<p>Ressourcen:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/community.traefik.io\/t\/ingressroute-tcp-service-does-not-exist-error\/12279\">IngressRoute TCP &#8211; Service Does Not Exist Error<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/stackoverflow.com\/questions\/63633098\/traefik-2-2-1-expose-mysql-service-in-kubernetes-cluster\">traefik 2.2.1 expose mysql service in kubernetes cluster<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/stackoverflow.com\/questions\/63857108\/what-is-the-disadvantage-using-hostsni-in-traefik-tcp-route-mapping\">what is the disadvantage using hostSNI(*) in traefik TCP route mapping<\/a><\/li>\n\n\n\n<li>&nbsp;<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Postgres Cluster Zugriff durch Traefik Um den Cluster au\u00dferhalb der K8s Cluster zuzugreifen, mussen wir [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-309","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.adartis.de\/index.php?rest_route=\/wp\/v2\/posts\/309","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.adartis.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.adartis.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.adartis.de\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.adartis.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=309"}],"version-history":[{"count":1,"href":"https:\/\/www.adartis.de\/index.php?rest_route=\/wp\/v2\/posts\/309\/revisions"}],"predecessor-version":[{"id":311,"href":"https:\/\/www.adartis.de\/index.php?rest_route=\/wp\/v2\/posts\/309\/revisions\/311"}],"wp:attachment":[{"href":"https:\/\/www.adartis.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=309"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.adartis.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=309"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.adartis.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=309"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}