Skip to content

apply cluster-config-full.yaml error, which show init-mysql container does not have hostname #129

Open
@yin-zt

Description

@yin-zt

[root@k8s-master mysql-operator]# k get pods
NAME READY STATUS RESTARTS AGE
my-cluster-0 0/2 Init:CrashLoopBackOff 6 7m59s
mysql-operator-fb994cd5c-h44mc 1/1 Running 0 28m
[root@k8s-master mysql-operator]# k logs -f my-cluster-0 -c init-mysql
++ hostname
bash: line 2: hostname: command not found

  • [[ '' =~ -([0-9]+)$ ]]
  • exit 1
    [root@k8s-master mysql-operator]# cat cluster-config_full.yaml
    apiVersion: cr.mysqloperator.grtl.github.com/v1
    kind: MySQLCluster
    metadata:
    name: "my-cluster"
    spec:
    secret: "my-secret" # Name of the secret containing the password
    port: 3306 # Port on which the service will expose the MySQL
    replicas: 2 # Number of replicas
    storage: "1Gi" # Persistance Volume Claim size for each replica
    image: "mysql:latest" # MySQL image
    [root@k8s-master mysql-operator]#

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions