Access SQL Server database from Kubernetes Pod Access SQL Server database from Kubernetes Pod kubernetes kubernetes

Access SQL Server database from Kubernetes Pod


For this scenario a headless service is very useful. You will redirect traffic to this ip without defining an endpoint.

kind: "Service"apiVersion: "v1"metadata:  namespace: "your-namespace"  name: "ftp"spec:  type: ExternalName  externalName: your-ip


The issue was resolved by updating the deployment yaml with IP address. Since all the servers were in same subnet, I did not need the to create a service or endpoint to access the DB. Thank you for all the inputs on the post