Stay organized with collections Save and categorize content based on your preferences.

Build a container image

Using the migration artifacts, build a container image for the migrated app that you can then deploy to your target cluster. You can build the container image using or Skaffold.

Skaffold allows you to build and deploy in the same command, and is typically easier to use. To build using Skaffold, see Build and deploy multiple images using Skaffold.

To use to build the container:

  1. Build the app container using the build script.

    chmod +x ./

    For TARGET, use openliberty or twas.

    On openliberty, if sensitive data is collected, liberty-secrets.yaml is generated. You need to apply the liberty-secrets.yaml prior to applying deployment_spec.yaml

    kubectl apply -f liberty-secrets.yaml
  2. Optionally set the service type in deployment_spec.yaml.

    By default, Migrate to Containers sets the service type to ClusterIP, which makes the service available only to the pods in the deployment cluster.

    If you want to be able to access the service externally, set the service type to LoadBalancer, or to any other type required by your deployment. For example:

    apiVersion: v1
    kind: Service
      type: LoadBalancer

You can now deploy the app container.

You can also use skaffold to build all applications:

  1. Install skaffold

    # For Linux x86_64 (amd64)
    curl -Lo skaffold && \
    sudo install skaffold /usr/local/bin/
  2. Run skaffold build on the download artifacts and skaffold run. And then check that the containers have been deployed.

    skaffold build --build-concurrency=1 --profile cloudbuild${PROJECT_ID} --file-output artifacts.json
    skaffold render  --namespace=default --build-artifacts=artifacts.json | tee full_deployment.yaml

What's next




WebSphere (Pre-Ga)