Deploying Bookinfo
This guide will help you deploy the Bookinfo application in your environment and verify the success of the deployment.
Before you begin, ensure that:
- You have a Customer Portal account with download access to the App Market. If you don't have an account, contact technical support.
TOC
Step 1: Create the Bookinfo project and namespace
-
Create a project and namespace In Project Management, click Create Project, name it
demo, and select the cluster where you plan to deploy the Bookinfo application. After the project is created, go to the project details page. In the left navigation panel, click Namespaces, and then Create Namespace, naming itdemo-dev. If you already have a project and namespace suitable for the Bookinfo deployment, you can skip this step and replace the namespace in the following commands with your own namespace.Note: Creating a project requires platform administrator permissions. If you don't have the necessary access, please contact the administrator for assistance.
Step 2: Download Bookinfo Resources
- Login and download Log in to Customer Portal, search for "Bookinfo" in the App Market, and download the resources.
Step 3: Push the Images
-
Upload and extract the package Upload the downloaded package to a server or PC that can connect to your image registry. Extract the package to obtain the following files:
bookinfo-images-arm64.tar: ARM architecture Bookinfo images.bookinfo-images-amd64.tar: x86 architecture Bookinfo images.push-images.sh: Image push script that automatically updates image references inbookinfo.yaml.bookinfo.yaml: YAML file for Bookinfo deployment, including Service and Deployment configurations.
-
Set script permissions Assign execution permission to the script:
-
Run the script to push images Execute the following command to push the images to your target registry:
Parameter Explanation:
source-image: The path to the image file.target-registry: The address and port of the image registry. Note: The prefix should not includehttps://orhttp://.requires-auth: Whether authentication is required. If not required, enterfalse; if required, entertrueand provide theusernameandpassword.username: The username for the image registry.password: The password for the image registry. Recommendation: Enclose it in single quotes to avoid command line parsing errors caused by special characters in the password.harbor-project: If using a Harbor image registry, enter the project name in Harbor; if using Docker Registry, this parameter can be left empty.
Step 4: Deploy the Bookinfo Application
-
Deploy using kubectl Open the container platform or platform management page, then click the
kubectltool at the bottom-right corner. -
Apply the YAML file Use
vior another terminal editor to paste the contents ofbookinfo.yamland run the following command: -
Verify successful deployment
-
Check that all Pods are in the
Runningstate: -
Verify the application is accessible:
Expected output:
-