Пакеты StatefulSet всегда ожидают - PullRequest
1 голос
/ 08 февраля 2020

Я новичок в Kubernetes и следовал этому руководству .

по развертыванию стека EFK в локальном кластере. После того, как я создаю файл statefulset.yml, когда я пытаюсь kubectl create -f statefulset.yml, модули никогда не запускаются.

При работе kubectl rollout status ... Я получаю Waiting for 3 pods to be ready...

Я использую кластер docker -desktop.

NAME                  READY   STATUS    RESTARTS   AGE
pod/elasticsearch-0   0/1     Pending   0          45m


NAME                    TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)             AGE
service/elasticsearch   ClusterIP   None         <none>        9200/TCP,9300/TCP   30h




NAME                             READY   AGE
statefulset.apps/elasticsearch   0/3     45m


Name:           elasticsearch-0
Namespace:      logging
Priority:       0
Node:           <none>
Labels:         app=elasticsearch
                controller-revision-hash=elasticsearch-6dd997c6d8
                statefulset.kubernetes.io/pod-name=elasticsearch-0
Annotations:    <none>
Status:         Pending
IP:
Controlled By:  StatefulSet/elasticsearch
Init Containers:
  fix-permissions:
    Image:      busybox
    Port:       <none>
    Host Port:  <none>
    Command:
      sh
      -c
      chown -R 1000:1000 /usr/share/elasticsearch/data
    Environment:  <none>
    Mounts:
      /usr/share/elasticsearch/data from data (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-gvqz5 (ro)
  increase-vm-max-map:
    Image:      busybox
    Port:       <none>
    Host Port:  <none>
    Command:
      sysctl
      -w
      vm.max_map_count=262144
    Environment:  <none>
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-gvqz5 (ro)
  increase-fd-ulimit:
    Image:      busybox
    Port:       <none>
    Host Port:  <none>
    Command:
      sh
      -c
      ulimit -n 65536
    Environment:  <none>
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-gvqz5 (ro)
Containers:
  elasticsearch:
    Image:       docker.elastic.co/elasticsearch/elasticsearch:7.2.0
    Ports:       9200/TCP, 9300/TCP
    Host Ports:  0/TCP, 0/TCP
    Limits:
      cpu:  1
    Requests:
      cpu:  100m
    Environment:
      cluster.name:                  k8s-logs
      node.name:                     elasticsearch-0 (v1:metadata.name)
      discovery.seed_hosts:          elasticsearch-0.elasticsearch,elasticsearch-1.elasticsearch,elasticsearch-2.elasticsearch
      cluster.initial_master_nodes:  elasticsearch-0,elasticsearch-1,elasticsearch-2
      ES_JAVA_OPTS:                  -Xms512m -Xmx512m
    Mounts:
      /usr/share/elasticsearch/data from data (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-gvqz5 (ro)
Conditions:
  Type           Status
  PodScheduled   False
Volumes:
  data:
    Type:       PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
    ClaimName:  data-elasticsearch-0
    ReadOnly:   false
  default-token-gvqz5:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  default-token-gvqz5
    Optional:    false
QoS Class:       Burstable
Node-Selectors:  <none>
Tolerations:     node.kubernetes.io/not-ready:NoExecute for 300s
                 node.kubernetes.io/unreachable:NoExecute for 300s
Events:
  Type     Reason            Age                   From               Message
  ----     ------            ----                  ----               -------
  Warning  FailedScheduling  3m39s (x44 over 64m)  default-scheduler  pod has unbound immediate PersistentVolumeClaims
...