Deploy Confluence on Kubernetes with Amazon RDS
Asked by Claudiu Ion:

Hi, I'm having some trouble with deploying Confluence on Kubernetes using an Amazon RDS. After setting up the cluster on Amazon EKS and installing Helm, I used the charts from this GitHub repository ([link](https://github.com/int128/devops-kompose/tree/master/atlassian-confluence)) to install Confluence. The only change that I made was to replace the service type from ClusterIP to LoadBalancer (otherwise I could not connect to Confluence). I also created a MySQL database on Amazon which I wanted to use for my Confluence installation.After I got an URL for my Confluence I proceeded with the setup. However, when I get to the database page, I cannot connect to the Amazon RDS that I created. This is the error I get:

![error.png](/t5/image/serverpage/image-id/40085i6BA868D8C82FBB4C/image-size/large?v=v2&px=999 "error.png")

Note that when deploying my database in amazon I chose the default VPC and enabled the public ip setting.

I think I might be missing something. Does anyone have any idea how to connect to the db ?Any help would be much appreciated. Thanks a lot !


Answers:
author: Shankar Asam {Appfire}
body: Hello Claudiu,

It looks a firewall issue but we can troubleshoot it. Can you confirm that you have opened/allow port 5432 in your security group for the application to connect PostgreSQL DB? You can try telnet to the database server on port 5432 and check that as well.

telnet \<db server\> 5432

-Shankar

comments: author: Claudiu Ion
body: Hi Shankar,

Thanks for the reply. I am not quite sure to which security group you are referring. If you're asking whether I opened port 5432 for my Kubernetes security group, yes I did (both for all inbound and all outbound traffic). I still get the connection error. Is there a guide for setting Confluence inside a Kubernetes cluster with an external db ? I seem to have a hard time finding any good material about this setup online.

Thanks !


author: Claudiu Ion
body: Hi Shankar,

Ok, so after playing around with some settings in the firewall, I indeed managed to connect to my Amazon RDS now (so thanks a lot for the tips). However, now I get the following issue (right after I click the Next button on the db setup window). This is what I get:

![log.png](https://community.atlassian.com/t5/image/serverpage/image-id/40107iF8DFA880DFF9BB09/image-size/large?v=v2&px=999 "log.png")

Do you have any idea what is going wrong here ? Could the issue come from the Confluence cluster setup (where it asks for a root directory ? I also was unsure what to fill in for that setting). I'm using the method for connecting via AWS secret.

Again, thanks for all your help !


author: Shankar Asam {Appfire}
body: Hi Claudiu,

Glad that you are able to connect fine now. To fix the error you're getting, I suggest you check the permissions/ownership on the confluence home directory. If this is a fresh installation, I would suggest you do the following;

Stop Confluence, Delete all files under

```
<confluence-home>/bundled-plugins<confluence-home>/plugins-cache<confluence-home>/plugins-osgi-cache<confluence-home>/plugins-temp<confluence-home>/bundled-plugins_language
```

Make sure the user running Confluence has read/write permissions on the Confluence home directory.

The following links help you understand and fix the problem;

<https://confluence.atlassian.com/confkb/unable-to-start-confluence-due-to-jmx-182158269.html?_ga=2.179631908.1810334672.1544595427-1148215165.1535622243>

<https://community.atlassian.com/t5/Confluence-questions/Confluence-Server-install-in-Docker-falure/qaq-p/458625>

-Thanks


author: Claudiu Ion
body: Hi Shankar,

Thanks again for the reply. I'm still quite unsure, how to set Confluence read/write permissions inside a Kubernetes cluster ? I just used Helm to install Confluence, but I am not sure how to set these permission. Could you maybe provide more details about how to do this ? (is it maybe related to service accounts inside the cluster)

This is what I used for installing Confluence in a Kubernetes cluster: [link](https://github.com/int128/devops-kompose/tree/master/atlassian-confluence) (you can see the setting of the Helm chart used in the values.yaml file)


author: sarath sasi
body: HI,

Any one got successful?


author: wolfram_laube
body: Hi Ion,

I used the same repository for the Helm Chart and did not even change the service type but put an ingress and cert-manager in front. I'm also trying to deploy to EKS and connect to an AWS RDS (Postgres 11). The database service is available, the tables get populated but finally I stumble across the same error as you. The log file states issues with stuck threads. Did. you finally get Confluece deployed (as the thread is solved) and if yes, which magic did you apply?

-Thanks


Tags: developer