Updated on 2024-06-17 GMT+08:00

Modifying the Source Code

Modifying an Application Service

As shown in Figure 1, you need to change the Service Type of the podinfo service in the cluster from ClusterIP to NodePort and expose the port to the live network.

Figure 1 Services
  1. Go to the source code repository of the configuration set, find and open the service.yaml file in the podinfo/kustomize directory according to the repository source information. Click , change type: ClusterIP to type: NodePort, and click to save the change.

  2. Log in to the management console. Choose Ubiquitous Cloud Native Service from Service List on the left and select Configuration Management to go to the cluster where the configuration set to be modified resides. Click the configuration set name to view the configuration set information. If Synchronization Status under Repository Source Synchronization Status is Running, the repository source code has been synchronized. Click K8s Resources.

    After the repository source code is modified, the cluster needs to pull and deploy the application again. This may take several minutes.

  3. On the K8s Resources page, select the podinfo resource whose Resource Type is Service and click View Details in the Operation column.

  4. On the Services page, view the port number of podinfo in the column Access Port:Container Port/Protocol.

  5. Enter Cluster EIP:HTTP port number (32286 in this case) to access the Service page.