Skip to main content

One post tagged with "external"

View All Tags

· One min read
Hreniuc Cristian-Alexandru

Check this

This is an example of how to connect an internal pod to an external db that is not inside the cluster. In the pod configuration you will need to connect to the brandName-database service from below.

apiVersion: v1
kind: Service
metadata:
name: brandName-database
spec:
ports:
- name: brandName-database-external
protocol: TCP
port: 3306
targetPort: 3306

---
kind: Endpoints
apiVersion: v1
metadata:
name: brandName-database
subsets:
- addresses:
- ip: 192.168.100.52
ports:
- port: 3306
name: brandName-database-external