<p>I have set up an Arango instance on Kubernetes nodes, which were installed on a VM, as mentioned in the ArangoDB docs <a href="https://www.arangodb.com/docs/stable/tutorials-kubernetes.html" rel="nofollow noreferrer">ArangoDB on Kubernetes</a>. Keep in mind, I skipped the <code>ArangoLocalStorage</code> and <code>ArangoDeploymentReplication</code> step. I can see 3 pods each of agent, coordinators and dbservers in get pods.</p>
<p>The <code>arango-cluster-ea service</code>, however, shows the external IP as pending. I can use the master node's IP address and the service port to access the Web UI, connect to the DB and make changes. But I am not able to access either the Arango shell, nor am I able to use my Python code to connect to the DB. I am using the Master Node IP and the service port shown in <code>arango-cluster-ea</code> in services to try to make the Python code connect to DB. Similarly, for arangosh, I am trying the code:</p>
<pre><code>kubectl exec -it *arango-cluster-crdn-pod-name* -- arangosh --service.endpoint tcp://masternodeIP:8529
</code></pre>
<p>In case of Python, since the Connection class call is in a try block, it goes to except block. In case of Arangosh, it opens the Arango shell with the error:</p>
<pre><code>Cannot connect to tcp://masternodeIP:port
</code></pre>
<p>thus not connecting to the DB.</p>
<p>Any leads about this would be appreciated.</p>

Arghya Dutta
<p>Posting this community wiki answer to point to the github issue that this issue/question was resolved.</p>
<p>Feel free to edit/expand.</p>
<hr />
<p>Link to github:</p>
<ul>
<li><em><a href="https://github.com/arangodb/kube-arangodb/issues/734" rel="nofollow noreferrer">Github.com: Arangodb: Kube-arangodb: Issues: 734</a></em></li>
</ul>
<blockquote>
<p>Here's how my issue got resolved:</p>
<p>To connect to arangosh, what worked for me was to use ssl before using the localhost:8529 ip-port combination in the server.endpoint. Here's the command that worked:</p>
<ul>
<li><code>kubectl exec -it _arango_cluster_crdn_podname_ -- arangosh --server.endpoint ssl://localhost:8529</code></li>
</ul>
<p>For web browser, since my external access was based on NodePort type, I put in the master node's IP and the 30000-level port number that was generated (in my case, it was 31200).</p>
<p>For Python, in case of PyArango's Connection class, it worked when I used the arango-cluster-ea service. I put in the following line in the connection call:</p>
<ul>
<li><code>conn = Connection(arangoURL='https://arango-cluster-ea:8529', verify= False, username = 'root', password = 'XXXXX')</code>
The verify=False flag is important to ignore the SSL validity, else it will throw an error again.</li>
</ul>
<p>Hopefully this solves somebody else's issue, if they face the similar issue.</p>
</blockquote>
<hr />
<p>I've tested following solution and I've managed to successfully connect to the database via:</p>
<ul>
<li><code>arangosh</code> from <code>localhost</code>:</li>
</ul>
<pre class="lang-sh prettyprint-override"><code>Connected to ArangoDB 'http+ssl://localhost:8529, version: 3.7.12 [SINGLE, server], database: '_system', username: 'root'
</code></pre>
<ul>
<li>Python code</li>
</ul>
<pre class="lang-py prettyprint-override"><code>from pyArango.connection import *
conn = Connection(arangoURL='https://ABCD:8529', username=&quot;root&quot;, password=&quot;password&quot;,verify= False )
db = conn.createDatabase(name=&quot;school&quot;)
</code></pre>
<hr />
<p>Additional resources:</p>
<ul>
<li><em><a href="https://www.arangodb.com/tutorials/tutorial-python/" rel="nofollow noreferrer">Arangodb.com: Tutorials: Tutorial Python</a></em></li>
<li><em><a href="https://www.arangodb.com/docs/stable/tutorials-kubernetes.html" rel="nofollow noreferrer">Arangodb.com: Docs: Stable: Tutorials Kubernetes</a></em></li>
</ul>
