Override runtime image

This tutorial shows how to build a custom runtime image and override the Function's base image with it.

Prerequisites

Before you start, make sure you have these tools installed:

Steps

Follow these steps:

  1. Follow this example to build the Python's custom runtime image.
  • Kyma CLI
  • kubectl
  1. Export these variables:

    Click to copy
    export NAME={FUNCTION_NAME}
    export NAMESPACE={FUNCTION_NAMESPACE}
    export RUNTIME_IMAGE={RUNTIME_IMAGE_WITH_TAG}
  2. Create your local development workspace using the built image:

    Click to copy
    mkdir {FOLDER_NAME}
    cd {FOLDER_NAME}
    kyma init function --name $NAME --namespace $NAMESPACE --runtime-image-override $RUNTIME_IMAGE --runtime python39
  3. Deploy your Function:

    Click to copy
    kyma apply function
  4. Verify whether your Function is running:

    Click to copy
    kubectl get functions $NAME -n $NAMESPACE