Nacos 被用于:
部署 nacos 时,需要用到如下两个镜像,这两个镜像均来自于 nacos 官方发布到 docker hub 的镜像,
nacos/nacos-server:latest https://hub.docker.com/r/nacos/nacos-server nacos/nacos-mysql:5.7 https://hub.docker.com/r/nacos/nacos-mysql
碰到个奇葩的问题
使用官方的nacos/nacos-server:2.0.1镜像,会报错,连接不上数据库: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up. Caused by: java.sql.SQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up. Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure 换成官方的nacos/nacos-server:latest镜像就可以连接上数据库,但是web页面访问后查看nacos版本竟然是2.0.1。
# 需要事先有存储卷 1.kubectl create -f Namespace.yaml 2.kubectl create -f nacos-mysql.yaml 3.kubectl create -f nacos-mysql-service.yaml 4.kubectl create -f ConfigMap.yaml 5.kubectl create -f StatefulSet.yaml 6.kubectl create -f nacos-service.yaml
https://files.cnblogs.com/files/sanduzxcvbnm/single_nacos.7z