Log into a private package registry using credentials from a Secret
Serverless allows you to consume private packages in your Functions. This tutorial shows how you can log into a private package registry by defining credentials in a Secret custom resource (CR).
Create a Secret CR for your Node.js or Python Functions. You can also create one combined Secret CR for both runtimes.
- Node.js & Python
Create a Function with dependencies from the external registry. Check if your Function was created and all conditions are set to
kubectl get functions -n $NAMESPACE
You should get a result similar to the this example:
NAME CONFIGURED BUILT RUNNING RUNTIME VERSION AGEtest-function True True True nodejs14 1 96s
CAUTION: If you want to create a cluster-wide Secret, you must create it in the
kyma-systemNamespace and add the
serverless.kyma-project.io/config: credentialslabel. Read more about requirements for Secret CRs.