Gitlab CI/CD: deploy docker image to existing kubernetes cluster
Your error is most likely from referencing the wrong directory in your script block of your job.
When GitLab executes your job in a container, it mounts the project directory to the /builds directory in the container. You can reference this either by specifying /builds/scheduler-deployment.yaml or by using the predefined environment variable $CI_PROJECT_DIR with $CI_PROJECT_DIR/scheduler-deployment.yaml.