Accessing my python graphql application deployed in an istio enabled cluster from my front end React app

4/7/2020

I have a sample react application that queries a Graphql Python application to just print a list of hardcoded employee names on the screen. I have deployed both of these applications on a cluster and an istio-enabled namespace.

Currently, I am accessing the graphql python application through an External Load Balancer from within my React app. Like this -

const cache = new InMemoryCache();
const link = new HttpLink({
  uri: "http://**<<<External-ELB>>**:5555/graphql"
})

//appolo client setup
const client = new ApolloClient({
  cache,
  link

})
class App extends Component{
  render(){
    return(
      <ApolloProvider client={client}>

        <div className="main">
          <h1> Employee Data List</h1>
          <Routes />
        </div>

      </ApolloProvider>
    );
  }
}

I have tried creating a Virtual service for my application and adding the istio-ingress-gateway ELB in the place of External-ELB, which works fine but I can still access my graphql app through the browser, which I want to avoid.

Is there any way to handle this with Istio envoy proxies?

I only want to expose my front end with Istio-Ingress-ELB and access my back end application without being exposed. Now, How do I access My python application without exposing it as a Load Balancer?

Thanks in advance.

-- user12951850
google-kubernetes-engine
istio
kubectl
kubernetes
kubernetes-pod

0 Answers