SQL Server on Kubernetes (aks) login for SA failed

8/7/2020

I am trying to deploy a custom SQL Server 2019 docker image from my docker hub repository to a kubernetes cluster (aks) but not able to log in to the DB instance from outside. It says login for user 'sa' failed.

I have verified the password requirements and literally tried using the same used in Microsoft docs but still can't log in to SQL Server.

Tried using sqlcmd and Azure Data Studio and I know it is reaching the server because the errorlog has the following error:

Error: 18456, Severity: 14, State: 8<br>Login failed for user 'sa'. Reason: Password did not match that for the login provided.

-- Parikshit Bhagawati
azure-aks
docker
kubernetes
sql-server-2019

1 Answer

8/10/2020

Tested the same passwords, in my local docker environment and incidently, all of them gave the same error whenever I spun the container. After a few options, I used a simple password which worked locally and in k8s as well.

Have raised an SR with MS to understand password policy reqs. as to why some passwords didn't work. Event the one provided in their docs.

Thanks @Larnu and @Aaron Bertrand for your time and inputs.

-- Parikshit Bhagawati
Source: StackOverflow