云服务器上部署Kubernetes集群(K8S)

master节点:master  

node节点:node1 

由于是ubuntu系统,参考两个博客配置

安装vmware搭建k8s集群(亲试无坑)-CSDN博客    该博客是centos系统,所以稍微有点区别结合另一篇博客一起参考

kubernetes集群部署-云社区-华为云   

# 启动chronyd服务
systemctl start chronyd
 
#设置chronyd服务开机自启
systemctl enable chronyd
 
# chronyd服务启动稍等几秒钟,就可以使用date命令验证时间了
date

可能报错:

root@hcss-ecs-ed4e:/# systemctl enable chronyd
Failed to enable unit: Refusing to operate on alias name or linked unit file: chronyd.service

解决步骤:

#先找其具体位置
root@hcss-ecs-ed4e:/# find /etc/systemd/system -name chronyd.service
/etc/systemd/system/chronyd.service
#尝试直接启用文件  仍报错  可能是个别名或链接到另一个单元文件
root@hcss-ecs-ed4e:/# systemctl enable /usr/lib/systemd/system/chronyd.service
Failed to enable unit: Unit file /usr/lib/systemd/system/chronyd.service does not exist.
#使用 file 命令查看文件实际类型  可以看到是一个链接
root@hcss-ecs-ed4e:/# file /etc/systemd/system/chronyd.service
/etc/systemd/system/chronyd.service

你可能感兴趣的:(服务器,kubernetes,运维)