我是openshift的新手,但是上个月我在开放式班次上部署了一个项目,它工作正常,但现在我无法将我的phpmyadmin pod连接到MySQL它一直给我错误没有路由到主机。
这是我的MySQL服务yaml
apiVersion: v1
kind: Service
metadata:
annotations:
template.openshift.io/expose-uri: 'mysql://{.spec.clusterIP}:{.spec.ports[?(.name=="mysql")].port}'
creationTimestamp: '2018-04-26T07:55:22Z'
labels:
app: mysql-persistent
template: mysql-persistent-template
name: mysql
namespace: qrattendfirst
resourceVersion: '2207628942'
selfLink: /api/v1/namespaces/qrattendfirst/services/mysql
uid: 2bb4db5e-4927-11e8-a6d6-0ab8769191d3
spec:
clusterIP: 172.30.125.169
ports:
- name: mysql
port: 3306
protocol: TCP
targetPort: 3306
selector:
name: mysql
sessionAffinity: None
type: ClusterIP
status:
loadBalancer: {}
这是我在phpmyadmin
的config.inc.php中的设置$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['host'] = 'mysql';
$cfg['Servers'][$i]['port'] = '3306';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = true;
完整的回购是在GitHub.com/Srikantkarnani/phpmyadmin
这是我不断得到的错误,MySQL日志也没有任何变化。enter image description here