Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

Unable to get serverless working on aks #152

Closed
posix4e opened this issue Oct 1, 2018 · 4 comments
Closed

Unable to get serverless working on aks #152

posix4e opened this issue Oct 1, 2018 · 4 comments

Comments

@posix4e
Copy link

posix4e commented Oct 1, 2018

By default you don't have permission for my config map even though my kubectl config is properly configured.

serverless deploy -v

/home/posix4e/src/serverlesstest/node_modules/serverless-kubeless/lib/config.js:56
      return JSON.parse(this.configMag.data[key]);
                                           ^
TypeError: Cannot read property 'runtime-images' of undefined
    at Config.get (/home/posix4e/src/serverlesstest/node_modules/serverless-kubeless/lib/config.js:56:44)
    at Object.getRuntimeDepfile (/home/posix4e/src/serverlesstest/node_modules/serverless-kubeless/lib/helpers.js:182:34)
    at ReadStream.s.on (/home/posix4e/src/serverlesstest/node_modules/serverless-kubeless/deploy/kubelessDeploy.js:103:39)
    at ReadStream.emit (events.js:187:15)
    at ReadStream.EventEmitter.emit (domain.js:442:20)
    at endReadableNT (_stream_readable.js:1092:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)

When I run kubectl proxy and hard code the CM to localhost I get

-----------------------------------
 
Error: Found errors while processing the given functions:
Error: Unable to update the function hello. Received:
  Code: 403
  Message: functions.kubeless.io "hello" is forbidden: User "clusterUser" cannot patch functions.kubeless.io in the namespace "default"
    at Object.checkFinished (/home/posix4e/src/serverlesstest/node_modules/serverless-kubeless/lib/helpers.js:209:14)
    at deployFunction.catch.then (/home/posix4e/src/serverlesstest/node_modules/serverless-kubeless/lib/deploy.js:479:21)
From previous event:
    at PluginManager.invoke (/home/posix4e/.nvm/versions/node/v10.10.0/lib/node_modules/serverless/lib/classes/PluginManager.js:390:22)
    at PluginManager.run (/home/posix4e/.nvm/versions/node/v10.10.0/lib/node_modules/serverless/lib/classes/PluginManager.js:421:17)
    at variables.populateService.then.then (/home/posix4e/.nvm/versions/node/v10.10.0/lib/node_modules/serverless/lib/Serverless.js:157:33)
    at runCallback (timers.js:694:18)
    at tryOnImmediate (timers.js:665:5)
    at processImmediate (timers.js:647:5)
    at process.topLevelDomainCallback (domain.js:121:23)
From previous event:
    at Serverless.run (/home/posix4e/.nvm/versions/node/v10.10.0/lib/node_modules/serverless/lib/Serverless.js:144:8)
    at serverless.init.then (/home/posix4e/.nvm/versions/node/v10.10.0/lib/node_modules/serverless/bin/serverless:43:50)
 
@andresmgot
Copy link
Contributor

This is the same error than #149 (comment). It's not possible yet to use this plugin with EKS due to the authentication method for that platform. How are you authenticating against you AKS plugin? Do you have RBAC permissions to get the Kubeless configmap in the kubeless namespace?

If this is an authentication issue you can still try to deploy your functions with the kubeless binary: https://github.com/kubeless/kubeless/releases

@posix4e
Copy link
Author

posix4e commented Oct 2, 2018

@andresmgot I believe it's caused by a different issue

kubectl get cm -n kubeless kubeless-config -o yaml | wc -l
180

Seems to work just fine

@andresmgot
Copy link
Contributor

Yes, the problem is that the javascript library cannot use the exec auth plugin, so that may be the reason.

@anaik-zam
Copy link
Contributor

this was kinda addressed in #189
it works with aws-iam-authenticator, created a PR
#192

@posix4e posix4e closed this as completed May 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants