Configuring a Port for Obtaining the Pod Information
CCI will provide the PodList if you enable the HTTP service on a specific port. This port is read-only and can be configured using an annotation. Containers can access http://127.0.0.1:<port>/pods to obtain the PodList. This allows observability tools (such as monitoring and logging tools) in service containers to access the pod information in real time for real-time monitoring of pod statuses.
If the podSpec.extraEphemeralStorage parameter is configured for a pod and the PodList is queried using this parameter, the configuration is synchronized to resource.cci.io/extra-ephemeral-storage-in-GiB of metadata.annotations.
Configuration Example
apiVersion: cci/v2
kind: Pod
metadata:
annotations:
resource.cci.io/pod-size-specs: 0.25_0.5
resource.cci.io/instance-type: general-computing # Pod type
observability.cci.io/read-only-port: "10255" # Port for obtaining the PodList
labels:
app: nginx
name: 'test1'
spec:
containers:
- name: nginx
image: centos:nginx
ports:
- containerPort: 80
dnsPolicy: ''
imagePullSecrets:
- name: imagepull-secret
dnsConfig: {} | Annotation | Mandatory | Type | Description |
|---|---|---|---|
| observability.cci.io/read-only-port | Yes | String | Description: port for obtaining the PodList. You can configure the port through an annotation. Containers can access http://127.0.0.1:<read-only-port>/pods to obtain the PodList. Constraints:
|
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot