The reason is that my aws creds to deploy using Serverless are different from the creds used to authenticate with my k8s cluster. But I need to interact with AWS to grab some variables from CF stacks' outputs.
Set dummy variables in your env and run an sls deploy. Your dummy variables should be overwritten by those found in your ~/.kube/config and your deployment work.
Description:
Env variables grabbed from user.exec.env are not used https://github.com/serverless/serverless-kubeless/blob/0b62c54f27754f0e90e99f9f891a4644484d0bd6/lib/helpers.js#L130-L135
As you can see, only the AWS_PROFILE is used.
I expect those variables to be added to the env used by the aws cli command. In my case I'm trying to unset those variables by using
The reason is that my aws creds to deploy using Serverless are different from the creds used to authenticate with my k8s cluster. But I need to interact with AWS to grab some variables from CF stacks' outputs.
I also found that https://github.com/serverless/serverless-kubeless/blob/0b62c54f27754f0e90e99f9f891a4644484d0bd6/lib/helpers.js#L129 is incorrect cause it's used at https://github.com/serverless/serverless-kubeless/blob/0b62c54f27754f0e90e99f9f891a4644484d0bd6/lib/helpers.js#L138. it should be replaced by
Cause it's what expects https://nodejs.org/api/child_process.html#child_process_child_process_execsync_command_options Or instead variables could be added to process.env and envvars is useless How to reproduce it (as minimally and precisely as possible): Have a similar configuration file
Set dummy variables in your env and run an sls deploy. Your dummy variables should be overwritten by those found in your ~/.kube/config and your deployment work.