Relative Content

Tag Archive for sqlsql-serverkubernetesyaml

Execute SQL commands in k8s

I’m trying to figure out how can i execute SQL commands on MSSQL server which running in kubernetes. I tride init container and postStart hook but cant seem to find an answer.
When im using PowerShell, with this command i can excecute SQL commands on the SQL server. But cant do that from the yaml pipeline itself. kubectl exec -it podname -- /opt/mssql-tools/bin/sqlcmd -S localhost -U username -P "password" -Q "SELECT @@VERSION;"

Excecute SQL commands in k8s

I’m trying to figure out how can i excecute SQL commands on MSSQL server which running in kubernetes. I tride init container and postStart hook but cant seem to find an answer.
When im using PowerShell, with this command i can excecute SQL commands on the SQL server. But cant do that from the yaml pipeline itself. kubectl exec -it podname — /opt/mssql-tools/bin/sqlcmd -S localhost -U username-P “password” -Q “SELECT @@VERSION;”