Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Deploy functions

After you have build and tested your function, it’s time to deploy it to STACKIT Functions for real.

To do so, you can follow these steps:

  1. Get the ID of the Registry credential you want the STACKIT Functions to use, using the STACKIT Functions CLI:
    sfn config registry list
    
    This command will print out a list of registry credentials configured in your project; pick the one matching the image you want to deploy.
  2. Invoke the push subcommand to upload the image to the OCI registry:
    sfn function push
    
    (Note: push will pick the right registry from the --image flag you passed to sfn function build earlier. If you need to override the image for the deployment process, you can also pass the --image flag to the deploy and push subcommands)
  3. Invoke the deploy subcommand to create the STACKIT Functions configuration. Make sure to pass the correct --registry-id:
    sfn function deploy --registry-id=<registry credential id>
    
    (Note: deploy also has options for building and pushing as part of the same step. See the sfn function deploy reference for more details.)

Once the deployment process completes, you should get a message similar to the following:

Name: your-function-name
ID: 00000000-0000-0000-0000-000000000000
Created: 1234-05-06T07:08:09.101112Z
Updated: 1234-05-06T07:08:09.101112Z
URL: 00000000-0000-0000-0000-000000000000.functions.onstackit.cloud

Follow the URL displayed by the command to see your function running on the STACKIT Functions runtime!

Note: It might take about a minute for your newly-deployed function revision to become available.

Note: Check out the Troubleshooting guide if your function is not available even after a minute has passed.