Configuring a Custom NTP Server Address
Scenarios
By default, CCI uses Huawei Cloud's unified NTP server for time synchronization, which meets the requirements of most services. If your services are deployed in an isolated network environment or your distributed architecture has strict compliance requirements for a unified internal clock source, you can configure a custom NTP server for precise time synchronization. When you create a pod or Deployment or modify a Deployment, you can specify the NTP server address by using the system.cci.io/ntp-server annotation for the pod or Deployment, so that the pod can synchronize time with the specified NTP server.
How to Use
Add the system.cci.io/ntp-server: ntp.customization.com annotation to specify the NTP server address. If no NTP server is specified, the pod uses the default NTP server for time synchronization.
Constraints
- By default, the Huawei Cloud NTP server (ntp.myhuaweicloud.com) is used for time synchronization. You do not need to manually configure the NTP server address.
- If you manually configure it, ensure that the specified NTP server is accessible and stable on the cluster network.
Disclaimer
Time synchronization is critical to the stability and security of service systems. Incorrect or unstable time sources may cause the following problems:
- Disorganized application logs, which affect troubleshooting and audit
- Failed SSL certificate verification
- Data inconsistency in the distributed system, or abnormal task scheduling
- Components that depend on time, such as database transactions, cache expiration, and message queues, run abnormally.
You are advised to use the default NTP server address. If you use a custom NTP server, ensure that the server is reliable, stable, and secure. You are solely responsible for any issue (including but not limited to service unavailability, data loss, service interruptions, or security risks) caused by a custom NTP server. Cloud services are not liable for any faults or losses caused by the custom NTP server.
Creating a Pod Using ccictl
```yaml
kind: Deployment
apiVersion: cci/v2
metadata:
name: nginx
spec:
replicas: 1
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
annotations:
system.cci.io/ntp-server: ntp.customization.com # Custom NTP server address
spec:
containers:
- name: nginx
image: nginx:latest
resources:
limits:
cpu: 500m
memory: 1Gi
requests:
cpu: 500m
memory: 1Gi
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
restartPolicy: Always
terminationGracePeriodSeconds: 30
dnsPolicy: Default
securityContext: {}
schedulerName: default-scheduler
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 25%
maxSurge: 25%
progressDeadlineSeconds: 600
``` 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