Pod Access to Metadata
It specifies whether to allow newly created pods in a cluster to access their node metadata, such as AZs and enterprise project ID. For details about the metadata types and how to obtain metadata, see ECS Metadata Types. This function is only available for clusters of v1.23.13-r0, v1.25.8-r0, v1.27.5-r0, v1.28.3-r0, or later versions.
- If a pod is created after this function is enabled, its ability to access metadata depends on the function's status.
- If a pod is created after this function is disabled, or in a cluster of an earlier version without this function, it cannot access metadata. To enable a pod to access metadata, it must be rebuilt while the function is enabled.
Value Range
Enable/Disable
Default Value
Disabled
Modifiable
Yes
Scope
CCE Turbo clusters
Example
- Enable Pod Access to Metadata. After this function is enabled, the newly created pods in the cluster can access their node metadata.
- Log in to the CCE console and click the name of a CCE Turbo cluster to access the cluster console.
- In the navigation pane, choose Settings. In the right pane, click the Network tab and enable Pod Access to Metadata.
- Click Confirm Settings.
- Create a workload. For details about how to create a workload, see Creating a Deployment.
- Check whether the node metadata can be accessed by the workload pod.
- Log in to the pod. For details about how to log in to a pod, see Logging In to a Container.
- Obtain the metadata of the node where the pod is located. For details, see ECS Metadata Types.
curl http://169.254.169.254/openstack/latest/meta_data.json
169.254.169.254 is the reserved IP address of the metadata. There is no need to change it.
Information similar to the following is displayed:
{"uuid":"xxx","meta":{"My Server Name":"xxx","agency_name":"","bootstrap-token":"","cascaded.instance_extrainfo":"pcibridge:1,virtio_bus_count:8","charging_mode":"0",...
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