# How to connect postgresql pod with another application pod?

**URL:** <https://discuss.kubernetes.io/t/how-to-connect-postgresql-pod-with-another-application-pod/18661>\
**Category:** General Discussions\
**Tags:** development\
**Created:** [January 9, 2022, 9:43am UTC](https://discuss.kubernetes.io/t/how-to-connect-postgresql-pod-with-another-application-pod/18661 "2022-01-09T09:43:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![IO-create](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/io-create/32/9273_2.png) [@IO-create](https://discuss.kubernetes.io/u/IO-create)\
**Post date:** [January 9, 2022, 9:43am UTC](https://discuss.kubernetes.io/t/how-to-connect-postgresql-pod-with-another-application-pod/18661/1 "2022-01-09T09:43:48Z")

</div>

In Docker-Compose it running well, but when I tried Kubernetes I’m not able to connect to it.

docker-compose.yaml

version: ‘3’

services:  
db:  
image: postgres  
restart: always  
environment:  
POSTGRES\_PASSWORD: db-pass  
ports:  
- 5433:5432

service:  
build: .  
ports:  
- “8000:8000”  
depends\_on:  
- db  
environment:  
CONFIG\_PROFILE: local-docker

Can anyone help me to convert to deployment & service files?

Thanks in advance!!!
