mysql-operator icon indicating copy to clipboard operation
mysql-operator copied to clipboard

Create a MysqlCluster cluster, can not see the mysql pod

Open 1121437613 opened this issue 4 years ago • 10 comments

Create a MysqlCluster cluster, can not see the mysql pod. The operator is installed through helm, and there is no obvious error,But after creating MysqlCluster, kubectl get pods cannot see the pod about MysqlCluster. May I ask which step is wrong?

1121437613 avatar Jan 19 '21 05:01 1121437613

Supplement: kubectl describe MysqlCluster does not have any event information

1121437613 avatar Jan 19 '21 05:01 1121437613

Hi @1121437613,

Can you please check the operator logs? Also, please list the statefulsets to see if the operator managed to deploy it.

AMecea avatar Jan 19 '21 15:01 AMecea

Hi @1121437613,

Can you please check the operator logs? Also, please list the statefulsets to see if the operator managed to deploy it.

operator pod log : E0121 06:48:51.944849 1 reflector.go:178] pkg/mod/k8s.io/[email protected]/tools/cache/reflector.go:125: Failed to list *v1alpha1.MysqlCluster: v1alpha1.MysqlClusterList.Items: []v1alpha1.MysqlCluster: v1alpha1.MysqlCluster.Spec: v1alpha1.MysqlClusterSpec.MysqlConf: MinAvailable: ReadString: expects " or n, but found 1, error found in #10 byte of ...|ailable":1,"mysqlCon|..., bigger context ...|-448d-8623-07450f72d09b"},"spec":{"minAvailable":1,"mysqlConf":{"initContainers":[{"command":["sh","|...

【The above is the log of the operator pod. Could you please help to see it, thank you very much】

1121437613 avatar Jan 21 '21 06:01 1121437613

same problems, is anyone has a sloution?

AManMustHaveACode avatar Feb 25 '21 08:02 AManMustHaveACode

Same problems here

hmilkovi avatar Mar 25 '21 20:03 hmilkovi

I have a similar problem , but the log is different E0330 11:30:34.254657 1 leaderelection.go:325] error retrieving resource lock mysql-operator/mysql-operator-leader-election: leases.coordination.k8s.io "mysql-operator-leader-election" is forbidden: User "system:serviceaccount:mysql-operator:presslabs-mysql-operator" cannot get resource "leases" in API group "coordination.k8s.io" in the namespace "mysql-operator" E0330 11:30:37.332318 1 leaderelection.go:325] error retrieving resource lock mysql-operator/mysql-operator-leader-election: leases.coordination.k8s.io "mysql-operator-leader-election" is forbidden: User "system:serviceaccount:mysql-operator:presslabs-mysql-operator" cannot get resource "leases" in API group "coordination.k8s.io" in the namespace "mysql-operator"

Hi @1121437613,

Can you please check the operator logs? Also, please list the statefulsets to see if the operator managed to deploy it.

lizhiyong2000 avatar Mar 30 '21 11:03 lizhiyong2000

add below code in role.yaml, then above errors disappear

  • apiGroups:
    • coordination.k8s.io resources:
    • leases verbs:
    • create
    • get
    • list
    • update

I have a similar problem , but the log id different E0330 11:30:34.254657 1 leaderelection.go:325] error retrieving resource lock mysql-operator/mysql-operator-leader-election: leases.coordination.k8s.io "mysql-operator-leader-election" is forbidden: User "system:serviceaccount:mysql-operator:presslabs-mysql-operator" cannot get resource "leases" in API group "coordination.k8s.io" in the namespace "mysql-operator" E0330 11:30:37.332318 1 leaderelection.go:325] error retrieving resource lock mysql-operator/mysql-operator-leader-election: leases.coordination.k8s.io "mysql-operator-leader-election" is forbidden: User "system:serviceaccount:mysql-operator:presslabs-mysql-operator" cannot get resource "leases" in API group "coordination.k8s.io" in the namespace "mysql-operator"

Hi @1121437613, Can you please check the operator logs? Also, please list the statefulsets to see if the operator managed to deploy it.

lizhiyong2000 avatar Mar 30 '21 12:03 lizhiyong2000

Hi, can you please check with version 0.5.0 which was just released? You can check the release notes at https://github.com/bitpoke/mysql-operator/releases/tag/v0.5.0.

calind avatar Oct 11 '21 11:10 calind

Still an issue. Any update? I'm using the latest version.

enoliveira avatar Dec 21 '21 22:12 enoliveira

@AMecea I just redeployed the Mysql Operator and it worked. Thanks.

` helm repo add presslabs https://presslabs.github.io/charts

helm install mysql-operator presslabs/mysql-operator `

enoliveira avatar Dec 21 '21 22:12 enoliveira