score:0
you seem to answer your own question: that ip address is private.
you'll want to set a service definition in order to expose it to the public.
score:1
the 3 main methods for accessing an internal kubernetes service from outside are: nodeport, loadbalancer, and ingress.
you can read about some of the main differences between them here https://medium.com/google-cloud/kubernetes-nodeport-vs-loadbalancer-vs-ingress-when-should-i-use-what-922f010849e0
nodeport
map a randomly or manually selected high port from a certain range to a service on a 1 to 1 basis.
either allow kubernetes to randomly select a high port, or manually define a high port from a predefined range which is by default 30000–32767 (but can be changed), and map it to an internal service port on a 1 to 1 basis.
warning: although it is possible to manually define a nodeport port number per service, it is generally not recommended due to possible issues such as port conflicts. so in most cases, you should let the cluster randomly select a nodeport port number for you.
from official docs: https://kubernetes.io/docs/concepts/services-networking/service/#nodeport
if you set the type field to nodeport, the kubernetes master will allocate a port from a range specified by --service-node-port-range flag (default: 30000-32767), and each node will proxy that port (the same port number on every node) into your service.
loadbalancer
attach a service to an external ip provided by an ip provider service such as a cloud provider public ip service.
the functionality of this service type depends on external drivers/plugins. most modern clouds offer support to supply public ips for loadbalancer definitions. but if you are spinning a custom cluster with no means to assign public ips (such as with rancher with no ip provider plugins), the best you can probably do with this is assign an ip of a host machine to a single service.
from the official docs: https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer
on cloud providers which support external load balancers, setting the type field to loadbalancer will provision a load balancer for your service. the actual creation of the load balancer happens asynchronously, and information about the provisioned balancer will be published in the service’s .status.loadbalancer field.
ingress
run a central application router service which receives all traffic on a certain port (or ports) and routes it to services based on parameters like the requested domain and path.
to install it you must create an application router service (such as nginx) which runs in your cluster and analyzes every new resource of type ingress that is created. then you create ingress resource that define the routing rules you would like such as which dns request to listen to and which service to forward the request to.
although multiple solutions exist for this purpose, i recommend nginx ingress
https://github.com/helm/charts/tree/master/stable/nginx-ingress https://github.com/kubernetes/ingress-nginx
official docs:
what is ingress? typically, services and pods have ips only routable by the cluster network. all traffic that ends up at an edge router is either dropped or forwarded elsewhere. conceptually, this might look like:
internet | ------------ [ services ] an ingress is a collection of rules that allow inbound connections to reach the cluster services. internet | [ ingress ] --|-----|-- [ services ] it can be configured to give services externally-reachable urls, load balance
traffic, terminate ssl, offer name based virtual hosting, and more. users request ingress by posting the ingress resource to the api server. an ingress controller is responsible for fulfilling the ingress, usually with a loadbalancer, though it may also configure your edge router or additional frontends to help handle the traffic in an ha manner.
Source: stackoverflow.com
Related Query
- Connect to private ip address - graphql - kubernetes
- I get this error when trying to connect to a graphcool relay API from a react app: Module build failed: Error: No valid GraphQL endpoint
- How to connect Relay to a GraphQL server running on different machine?
- connect react apollo frontend to graphql backend
- How to connect local private geth nodes to the web page without using metamask or mist?
- Invalid Host Header when ngrok tries to connect to React dev server
- Unable to connect with remote debugger
- How to get simple dispatch from this.props using connect w/ Redux?
- How to define a private property when implementing an interface in Typescript?
- React site warning: The href attribute requires a valid address. Provide a valid, navigable address as the href value jsx-a11y/anchor-is-valid
- Apollo GraphQL React - how to query on click?
- React router private routes / redirect not working
- connect and withRouter issue
- How to connect Threejs to React?
- What are some GraphQL schema naming best practices?
- How does Provider and connect work in react?
- How use react-redux connect with mapStateToProps,MapDispatchToProps and redux-router
- Relay vs Redux vs Apollo with GraphQL and React-Native
- GraphQL mutation: Invariant Violation: Must contain a query definition
- Using private key in a .env file
- How to update the Redux store after Apollo GraphQL query returns
- How do GraphQL & Redux work together?
- Why redux suggests to only connect to top level components?
- GraphQL post request in axios
- How to connect state to props with mobx.js @observer when use ES6 class?
- React Native on Ipad - Error - could not connect to development server
- Use Connect or pass data as props to children
- Is it possible to connect non component Class to redux store?
- Variables in graphQL queries
- Jest/Enzyme Unit Testing: How to pass store to shallow component that uses redux 4 and react-redux 6 connect function
More Query from same tag
- API showing up in console but not browser window
- error " Property 'innerText' does not exist on type 'EventTarget' "?
- Configuring Webpack for my React typescript project (Webpack Version 4.39.2)
- React table horizontal scroll bar displayed only at end of vertical scroll bar
- Add Cancel Icon for close of Material-UI Drawer
- Queries in a ReactJS Routing example
- How do I make a validation with usestate()?
- Material-UI, how to merge multiple styles with theme in typescript?
- How to redirect to another page in react confirmAlert?
- Firestore onSnapshot appending to array through state within onEffect
- How to spread nested properties in Object?
- I have a line of code in a non-component React file I need tested that doesn't get hit by tests
- ReactJS How to fetch only if a condition is true?
- react toggling class, importing using module
- correct syntax for react higher order component
- Trouble: Firebase: No Firebase App '[DEFAULT]' has been created - call Firebase App.initializeApp() (app-compat/no-app)
- React with Express Private Routes
- How do I get the name and id of a dropdown list and append to formdata in React?
- Error in dynamically setting state in React Hooks
- Show/Hide Section in dropdown menu for Gatsby Site
- How to send mac address to node api service? I'll need it to the Mikrotik API
- How to mock a function and expect it to be called?
- Difference between event.target.value and event.currentTarget.value
- Specify type for file upload event in react typescript
- How to clear timeout of self-restarting function on unmount?
- React : useEffect updates the state, but does not re-render the view
- TypeError: Cannot read property 'theme' of undefined at runMicrotasks
- How can i get the specific array using Lodash in react js
- The attempt to bind "/%PUBLIC_URL%/manifest.json" in the workspace failed as this URI is malformed CRA
- React with bootstrap and Radio buttons