Service
Service defines the access method to access the back-end Pod. For details of the service, please see kubernets official documentation - Service. Two access methods are currently supported.
- Internal: that is, the Service’s ClusterIP mode, which automatically assigns the cluster internal IP address for internal cluster access only.
- External: I.e. Loadbalance mode of Service, used with the load balancing service provided by external OneCloud , accessing the back-end pod through the service address of the load balancing instance, suitable for Web class services.
Entry: In the cloud management platform, click the top left corner of navigation menu, and click “Containers/Service & Load Balancing/Service” menu item in the left menu bar that pops up to enter the services page.
View services
This function is used to filter service information based on clusters and namespaces.
-
In the service page, by default, you can view the service information of all namespaces under a cluster.
-
When there are multiple clusters in the environment, click the input box on the right side of the cluster above the list and select other clusters to view the service information of all namespaces under other clusters.
-
When there are multiple namespaces under the cluster, click the input box on the right side of the namespace above the list, select the namespace, and view the service information under the specified namespace.
Create service
This function is used to create services based on existing deployment and Statefulset applications.
- On the Service page, click the “Create” button at the top of the list to enter the Create Service page.
- Configure the following parameters.
- Name: The name of the service.
- Cluster: Select the cluster to which the service belongs.
- Namespace: Select the namespace to which the service belongs. Namespaces are used to logically divide the cluster. deployment, pod, service, etc. all belong to a namespace. Kubernetes cluster will generate default, kube-system, and kube-public namespaces by default after the cluster is created.
- Selector: corresponds to the spec.selector of the yaml file, which is used to select the created stateless or stateful applications.
- Service: Set the access method for stateless or stateful applications and container groups, including internal access and external access.
- Internal: A ClusterIP will be automatically generated for access within the cluster and between container groups.
- Target port: The target port is the port on the pod.
- Service port: The user access port.
- Protocol: Select the protocol used by the application, including TCP and UDP.
- External: will be used with the load balancing function for access outside the cluster. Before using external service, you need to create load balancing cluster and nodes in load balancing first. When creating external service, a load balancing instance will be created in load balancing synchronously.
- Load balancing network: select IP subnet, the system will automatically assign an IP address from the IP subnet as the access IP.
- Target port: The target port is the port on the pod.
- Service port: The external user access port.
- Protocol: Select the protocol used by the application, including TCP and UDP.
- Internal: A ClusterIP will be automatically generated for access within the cluster and between container groups.
- Click the “OK” button to create the service.
View/Edit
This function is used to view or edit the service’s yaml file.
- In the service page, click the “More” button in the action bar on the right side of the service, and select the drop-down menu “View/Edit” menu item to bring up the View/Update dialog box.
- Support viewing and editing yaml file information of the service.
- After editing the yaml file, click the “OK” button to take effect.
Delete Service
This function is used to delete the service.
Individual deletion
- On the service page, click the “Delete” button on the right action bar of the service, and the action confirmation dialog box pops up.
- Click the “OK” button to delete the service and related resources.
Batch delete
- Select one or more services in the service list, and click the “Delete” button at the top of the list, the action confirmation dialog box pops up.
- Click the “OK” button to delete the service and its related resources.
View Service Details
This function is used to view the service related information.
- On the Service page, click the Service Name item to enter the Service Details page.
- View the following information: Cloud ID, ID, name, status, cluster, namespace, container group, image, initialized image, tag, created at, etc.
View container group
This function is used to view the container groups created by the service and supports managing container groups.
View/Edit
This function is used to view the yaml file of a container group.
- On the service page, click the service name item to enter the service details page.
- Click the “Container Groups” tab to enter the container groups page.
- Click the “View/Edit” button on the right column of the container group to bring up the View/Update dialog box.
- Support viewing and editing the yaml file information of the service.
- After editing the yaml file, click the “OK” button to take effect.
Delete
This function is used to delete a container group. After the container group is deleted, a new container group will be redeployed according to the yaml file settings.
- On the Service page, click the service name item to enter the service details page. Click the Container Groups tab to enter the Container Groups page.
- Click the “Delete” button on the right action bar of the container group to bring up the action confirmation dialog.
- Click the “OK” button to complete the operation.
View Events
This function is used to record the occurrence of resource object events, including the content, source, cause, and created at, for troubleshooting.
In the Service page, click the Service Name item to enter the Service Details page. 2. Click the Events tab to enter the Events page. View the content, source, cause, and created at of the event.
View source information
This function is used to view and edit the yaml information of the service.
In the Service page, click the service name item to enter the service details page. 2. Click the “Source Information” tab to enter the source information page. 3. Click the “Copy Content” button to copy the yaml file information of the node. 4. After updating the yaml file, click the “Update” button.
View Operation Log
This function is used to view the operation logs related to the service.
- On the Service page, click the service name item to enter the service details page.
- Click the Operation Log tab to enter the Operation Log page.
- Load More Logs: In the Operation Logs page, the list shows 20 operation logs by default. To view more operation logs, please click the “Load More” button to get more logs.
- View Log Details: Click the “View” button on the right column of the operation log to view the log details. Copy details are supported.
- View logs of specified time period: If you want to view the operation logs of a certain time period, set the specific date in the start date and end date at the top right of the list to query the log information of the specified time period.
- Export logs: Currently, only the logs displayed on this page are supported to be exported. Click the upper-right corner of icon, set the export data column in the pop-up export data dialog, and click the “OK” button to export the logs.