microsoft / microsoft/sql-server-samples

Unable to connect to primary with Kubernetes Service ag1-primary on AWS EKS

Open
#571 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PowerShell
Stars
11.2k
Forks
9.1k
Avg merge
2d 7h
Merged PRs (30d)
14

Description

I have successfully followed this guide to create am HA SQL cluster on Kubernetes.

The guide uses AKS but states that any Kubernetes cluster can be used. I am using EKS. Specifically, I used this Terraform module to provision an EKS cluster in a VPC in a private subnet.

I am using internal ELBs for the LoadBalancer. I can successfully connect to each intance, but am unable to connect to SQL using the primary-ag1 k8s service.

I get the following error:

image

One thing i noticed in the service is the selector points to a Microsoft API:

selector: {role.ag.mssql.microsoft.com/ag1: primary, type: sqlservr}

Could this be the issue as I'm not running in AKS?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the ag1-primary Kubernetes Service in the issue with the Microsoft SQL Server HA guide and inspect its selector and endpoints on EKS. Verify whether the primary service resolves to the intended SQL instance and whether the internal LoadBalancer behaves as expected. Done means identifying the EKS-specific cause and documenting or correcting the configuration needed to connect to the primary.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, kubernetes, sql
Domain
cloud, databases, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.