question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

k8s external ip configuration

See original GitHub issue

@jacobtomlinson made a comment here on externalizing services. I would suggest that the default be a NodePort for a two reasons:

  • Ingress/LoadBalancers can be tricky to setup/configure – especially for beginners
    • note: on clouds (GKE at least) ingress is automatically setup
  • Testing may be challenging (though not impossible)

NodePorts are builtin to k8s, we can easily test, and the setup should work out of the box without additional configuration

When using a NodePort I believe the pod/service is accessible by any nodeIP: https://kubernetes.io/docs/tutorials/services/source-ip/#source-ip-for-services-with-type-nodeport

For configuring a NodePort I would recommend looking at: https://kubernetes.io/docs/tasks/access-application-cluster/service-access-application-cluster/

or the following:

kind: Service 
apiVersion: v1 
metadata:
  name: SERVICENAME
spec:
  type: NodePort
  selector:
    app: APPNAME
  ports:
    # nodePort - a static port assigned on each the node
    # port - port exposed internally in the cluster (assigned on creation)
    # targetPort - the container port to send requests to
    - nodePort: 30163
      port: 8080 

cc @jcrist

@jacobtomlinson do you have thoughts here ?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
jcristcommented, Aug 1, 2019

Lots of helm charts I see seem to either use ClusterIP or LoadBalancer as a default. I feel like LoadBalancer makes more sense in this case, especially given they tend to “just work” with cloud providers.

I went with LoadBalancer as the default for this reason, but hopefully have things done in a way that users could use NodePort if needed.

0reactions
jcristcommented, Aug 2, 2019

After some conversations with dev-ops people, I’m moving to just having the user specify the scheduler proxy address as well.

This was done in #71.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Exposing an External IP Address to Access an Application in a ...
This page shows how to create a Kubernetes Service object that exposes an external IP address. Before you begin Install kubectl.
Read more >
Learn how to use Kubernetes External IP service type - Medium
Step 1: Setup Kubernetes cluster · Step 2: Create Kubernetes deployments · Step 3: Expose the deployments as External IP type · Step...
Read more >
Assign External IP to a Kubernetes Service - Stack Overflow
First of all run this command: kubectl get -n namespace services. Above command will return output like this: NAME TYPE CLUSTER-IP ...
Read more >
Expose external ip address - Unofficial Kubernetes
This page shows how to create a Kubernetes Service object that exposes an external IP address. Install kubectl. Use a cloud provider like...
Read more >
Exposing an External IP Address to Access an Application in a ...
This page shows how to create a Kubernetes Service object that exposes an external IP address. Objectives; Before you begin; Creating a service...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found