What does READY 2/2 mean in output of get pods

Viewed 413

In this tutorial https://kubernetes.io/docs/tasks/run-application/run-replicated-stateful-application/, the replicas mentioned in the stateful is 3 and 3 pods get started.

apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: mysql
spec:
  selector:
    matchLabels:
      app: mysql
  serviceName: mysql
  replicas: 3
...

What does 2/2 mean in the output of the command kubectl get pods -l app=mysql --watch:

NAME      READY     STATUS    RESTARTS   AGE
mysql-0   2/2       Running   0          2m
mysql-1   2/2       Running   0          1m
mysql-2   2/2       Running   0          1m
1 Answers

You have 2 containers in a pod, it means both of them are running.

Related