I was trying to reach the janusgraph deployed inside the GKE cluster, using the below code.
from gremlin_python import statics
from gremlin_python.structure.graph import Graph
from gremlin_python.process.graph_traversal import __
from gremlin_python.process.strategies import *
from gremlin_python.driver.driver_remote_connection import DriverRemoteConnection
from gremlin_python.process.anonymous_traversal import traversal
g = traversal().withRemote(DriverRemoteConnection('gs://private_network:8182/janusgraph','g'))
count = g.V().has('name','hercules').valueMap()
print(count)