Git Product home page Git Product logo

Comments (4)

feikesteenbergen avatar feikesteenbergen commented on July 19, 2024

I'm not sure if we want to support it directly in these Helm Charts, we'll take it into consideration before going to version 1.0.

How do you currently define the current NodePort service, what selector do you give it?

from helm-charts.

lonelyleaf avatar lonelyleaf commented on July 19, 2024

I just change the default service to nodeport like below.

apiVersion: v1
kind: Service
metadata:
  name: timescaledb-single
  namespace: timescaledb-single
spec:
  externalTrafficPolicy: Cluster
  ports:
    - name: postgresql
      nodePort: 31577
      port: 5432
      protocol: TCP
      targetPort: postgresql
  sessionAffinity: None
  type: Nodeport

Since patroni use endpoint to manage the leader metadata,I didn't find a way to use selector to connect to master database.

from helm-charts.

invernizzie avatar invernizzie commented on July 19, 2024

This would be useful to avoid a port-forward for development use.

from helm-charts.

clouedoc avatar clouedoc commented on July 19, 2024

Hello, I'm failing to expose Timescale with a NodePort instead of a LoadBalancer.

Here's what I tried.

First approach: full Helm

Here are the values.yml that I tried:

replicaCount: 1
service:
  primary:
    type: NodePort
    nodePort: 30001
  replica:
    type: ClusterIP
  loadBalancer:
    enabled: false

Here are the services that the Helm release creates when applied:

NAMESPACE                 NAME                                                  TYPE           CLUSTER-IP      EXTERNAL-IP   PORT(S)                  AGE
flux-system               timescaledb                                           LoadBalancer   10.42.142.161   51.159.9.15   5432:30905/TCP           9m44s
flux-system               timescaledb-config                                    ClusterIP      None            <none>        8008/TCP                 20m
flux-system               timescaledb-replica                                   ClusterIP      10.33.227.237   <none>        5432/TCP                 20m

Problems with this approach

  • I can't find how to use a NodePort instead of a LoadBalancer solely by editing the Helm chart values.

Second approach: creating a NodePort service

I create the following service:

kind: Service
apiVersion: v1
metadata:
  name: timescaledb-svc
  namespace: flux-system
spec:
  selector:
    app: timescaledb
    role: master
  type: NodePort
  externalIPs:
    - "51.15.223.40"
  ports:
    - name: timescale-pg-port
      port: 5432
      nodePort: 30001

I deleted the previously created LoadBalancer:

kubectl delete service timescaledb -n flux-system

I get the following services:

NAME                      TYPE        CLUSTER-IP      EXTERNAL-IP    PORT(S)          AGE
timescaledb-config        ClusterIP   None            <none>         8008/TCP         40m
timescaledb-replica       ClusterIP   10.33.227.237   <none>         5432/TCP         40m
timescaledb-svc           NodePort    10.41.23.237    51.15.223.40   5432:30001/TCP   3m

Problems with this approach

I can connect using port-forwarding.
The problems are related to exposing the port to the Internet.

  • It looks like I can access the port at 51.15.223.40:30001, but it times out (see screenshot). Why does this happen?
  • How can I expose the NodePort on all cluster nodes instead of one? Manually selecting an external IP seems wrong to me.

Timeout

image

Provider

My provider is Kapsule from Scaleway.

from helm-charts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.