Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

188
Visualizações
Access Postgres host from Tableau using kubernetes cluster as a kind of router

Scenario:

  • Tableau application;

  • Postgres on a cloud;

  • Kubernetes on another cloud, running an application based on Alpine image (different cloud than Postgres).

What a I need:

  • Access Postgres from Tableau using Kubernetes as a kind of router; So I need to send a request to my Kubernetes cluster, from tableau, and my Kubernetes cluster need to redirect the requisition to my Postgres host, and Postgres must to answer back to my kubernetes cluster after that my Kubernetes cluster must send de answer from Postgres to Tableau.

Important restrictions:

  • Tableau can access my kubernetes cluster but cannot access my Postgres host directly;

  • My kubernetes cluster can access my Postgres host.


Next steps Now I was able to make it work by using Thomas answer, using the following code:

apiVersion: v1
kind: Service
metadata:
  name: my-service
spec:
  type: NodePort
  ports:
    - port: 5432
      targetPort: 5432
      nodePort: 30004
---
apiVersion: v1
kind: Endpoints
metadata:
  name: my-service 
subsets:
  - addresses:
      - ip: **111.111.111.111** ** < need change this to hostname
    ports:
      - port: 5432


Everything works fine with numerical IP, but I need to put my Postgres DNS instead, something like:

subsets:
  - addresses:
      - ip: mypostgres.com
    ports:
      - port: 5432
over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

You can achieve this by creating a service type object with no selectors and then manually creating endpoints for it. The service must be exposed to the outside via NodePort or type Loadbalancer :

 apiVersion: v1 kind: Service metadata: name: my-service #Name of the service must match the name of the endpoints spec: type: NodePort ports: - port: 80 targetPort: 80 nodePort: 30007

Services are not linked to pods directly. There is another object between the called endpoints. Because of this, you can define them manually.

 apiVersion: v1 kind: Endpoints metadata: name: my-service #Name of te endpoint must match the name of the service subsets: - addresses: - ip: 172.217.212.100 # This is the IP of the endpoints that the service will forward connections to. ports: - port: 80

Since you are going to expose your postgres, some security measures should be taken to protect it, eg whitelist IP

For more information, visit /Services without selectors .

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda