<p>I created a single host Kubernetes cluster for test purposes by using this link(with Docker 19.3.8):</p>
<p><a href="https://computingforgeeks.com/install-kubernetes-cluster-on-centos-with-kubeadm/" rel="nofollow noreferrer">https://computingforgeeks.com/install-kubernetes-cluster-on-centos-with-kubeadm/</a></p>
<p>The cluster is up and running, every system pod is active/running.</p>
<p>The purpose i created this cluster to test some configurations via kubernetes on an ELK stack(mainly on elasticsearch itself.)</p>
<p>The yaml file is like the one below:</p>
<pre class="lang-yaml prettyprint-override"><code>    #namespace define
    apiVersion: v1
    kind: Namespace
    metadata:
      name: testlog
    
    ---
    #esnodes
    apiVersion: apps/v1
    kind: Deployment
    metadata:
      labels:
        app: testnode1
      name: testnode1
      namespace: testlog
    spec:
      replicas: 1
      selector:
        matchLabels:
          app: testnode1
      template:
        metadata:
          labels:
            app: testnode1
        spec:
          containers:
          - env:
            - name: ES_JAVA_OPTS
              value: -Xms768m -Xmx768m
            - name: MAX_LOCKED_MEMORY
              value: unlimited
            - name: bootstrap.memory_lock
              value: &quot;true&quot;
            - name: cluster.initial_master_nodes
              value: testnode1,testnode2,testnode3
            - name: cluster.name
              value: testcluster
            - name: discovery.seed_hosts
              value: testnode1,testnode2,testnode3
            - name: http.cors.allow-origin
              value: &quot;*&quot;
            - name: network.host
              value: 0.0.0.0
            - name: node.data
              value: &quot;false&quot;
            - name: node.name
              value: testnode1
            image: amazon/opendistro-for-elasticsearch:1.8.0
            name: testnode1
            securityContext:
              privileged: true
            volumeMounts:
            - mountPath: /usr/share/elasticsearch/data
              name: testnode1-claim0
    #      restartPolicy: Always
          volumes:
            - name: testnode1-claim0
              hostPath:
                path: /logtest/es1
                type: DirectoryOrCreate
    
    ---
    #es1 portservice
    apiVersion: v1
    kind: Service
    metadata:
      name: testnode1-service
      namespace: testlog
      labels:
        app: testnode1
    spec:
      type: NodePort
      ports:
      - port: 9200
        nodePort: 9201
        targetPort: 9200
        protocol: TCP
        name: testnode1-9200
      - port: 9300
        nodePort: 9301
        targetPort: 9300
        protocol: TCP
        name: testnode1-9300
      selector:
        app: testnode1
    
    
    ---
    #es1 dns
    apiVersion: v1
    kind: Service
    metadata:
      name: testnode1
      namespace: testlog
      labels:
        app: testnode1
    spec:
      clusterIP: None
      selector:
        app: testnode1
    
    ---
    
    apiVersion: apps/v1
    kind: Deployment
    metadata:
      labels:
        app: testnode2
      name: testnode2
      namespace: testlog
    spec:
      replicas: 1
      selector:
        matchLabels:
          app: testnode2
      template:
        metadata:
          labels:
            app: testnode2
        spec:
          containers:
          - env:
            - name: ES_JAVA_OPTS
              value: -Xms768m -Xmx768m
            - name: MAX_LOCKED_MEMORY
              value: unlimited
            - name: bootstrap.memory_lock
              value: &quot;true&quot;
            - name: cluster.initial_master_nodes
              value: testnode1,testnode2,testnode3
            - name: cluster.name
              value: testcluster
            - name: discovery.seed_hosts
              value: testnode1,testnode2,testnode3
            - name: http.cors.allow-origin
              value: &quot;*&quot;
            - name: network.host
              value: 0.0.0.0
            - name: node.data
              value: &quot;true&quot;
            - name: node.name
              value: testnode2
            image: amazon/opendistro-for-elasticsearch:1.8.0
            name: testnode2
            securityContext:
              privileged: true
            volumeMounts:
            - mountPath: /usr/share/elasticsearch/data
              name: testnode2-claim0
    #      restartPolicy: Always
          volumes:
            - name: testnode2-claim0
              hostPath:
                path: /logtest/es2
                type: DirectoryOrCreate
    
    ---
    
    #es1 dns
    apiVersion: v1
    kind: Service
    metadata:
      name: testnode2
      namespace: testlog
      labels:
        app: testnode2
    spec:
      clusterIP: None
      selector:
        app: testnode2
    
    ---
    
    apiVersion: apps/v1
    kind: Deployment
    metadata:
      labels:
        app: testnode3
      name: testnode3
      namespace: testlog
    spec:
      replicas: 1
      selector:
        matchLabels:
          app: testnode3
      template:
        metadata:
          labels:
            app: testnode3
        spec:
          containers:
          - env:
            - name: ES_JAVA_OPTS
              value: -Xms768m -Xmx768m
            - name: MAX_LOCKED_MEMORY
              value: unlimited
            - name: bootstrap.memory_lock
              value: &quot;true&quot;
            - name: cluster.initial_master_nodes
              value: testnode1,testnode2,testnode3
            - name: cluster.name
              value: testcluster
            - name: discovery.seed_hosts
              value: testnode1,testnode2,testnode3
            - name: http.cors.allow-origin
              value: &quot;*&quot;
            - name: network.host
              value: 0.0.0.0
            - name: node.data
              value: &quot;true&quot;
            - name: node.name
              value: testnode3
            image: amazon/opendistro-for-elasticsearch:1.8.0
            name: testnode3
            securityContext:
              privileged: true
            volumeMounts:
            - mountPath: /usr/share/elasticsearch/data
              name: testnode3-claim0
    #      restartPolicy: Always
          volumes:
            - name: testnode3-claim0
              hostPath:
                path: /logtest/es3
                type: DirectoryOrCreate
    
    ---
    
    #es3 dns
    apiVersion: v1
    kind: Service
    metadata:
      name: testnode3
      namespace: testlog
      labels:
        app: testnode3
    spec:
      clusterIP: None
      selector:
        app: testnode3
    
    ---
    
    #kibana dep
    apiVersion: apps/v1
    kind: Deployment
    metadata:
      labels:
        app: kibana
      name: kibana
      namespace: testlog
    spec:
      replicas: 1
      selector:
        matchLabels:
          app: kibana
      template:
        metadata:
          labels:
            app: kibana
        spec:
          containers:
          - env:
            - name: ELASTICSEARCH_HOSTS
              value: http://testnode1:9200
            - name: ELASTICSEARCH_URL
              value: http://testnode1:9200
            image: amazon/opendistro-for-elasticsearch-kibana:1.8.0
            name: kibana
    #      restartPolicy: Always
    
    ---
    #kibana  dns
    apiVersion: v1
    kind: Service
    metadata:
      name: kibana
      namespace: testlog
      labels:
        app: kibana
    spec:
      clusterIP: None
      selector:
        app: kibana
    ---
    #kibana port servi
    apiVersion: v1
    kind: Service
    metadata:
      name: kibana-service
      namespace: testlog
      labels:
        app: kibana
    spec:
      type: NodePort
      ports:
      - port: 5601
        nodePort: 5602
        targetPort: 5601
        protocol: TCP
        name: kibana
      selector:
        app: kibana
    
    ---
    
    #elasticsearch-hq deployment
    apiVersion: apps/v1
    kind: Deployment
    metadata:
      labels:
        app: elasticsearch-hq
      name: elasticsearch-hq
      namespace: testlog
    spec:
      replicas: 1
      selector:
        matchLabels:
          app: elasticsearch-hq
      template:
        metadata:
          labels:
            app: elasticsearch-hq
        spec:
          containers:
          - image: elastichq/elasticsearch-hq
            name: elasticsearch-hq
    #      restartPolicy: Always
    
    ---
    #elasticsearch-hq port service
    apiVersion: v1
    kind: Service
    metadata:
      name: elasticsearch-hq-service
      namespace: testlog
      labels:
        app: elasticsearch-hq
    spec:
      type: NodePort
      ports:
      - port: 8081
        nodePort: 8081
        targetPort: 5000
        protocol: TCP
        name: elasticsearch-hq
      selector:
        app: elasticsearch-hq
</code></pre>
<p>after kubectl create command I get the following output:</p>
<pre><code>    namespace/testlog created
    deployment.apps/testnode1 created
    service/testnode1-service created
    service/testnode1 created
    deployment.apps/testnode2 created
    service/testnode2 created
    deployment.apps/testnode3 created
    service/testnode3 created
    deployment.apps/kibana created
    service/kibana created
    service/kibana-service created
    deployment.apps/elasticsearch-hq created
    service/elasticsearch-hq-service created
</code></pre>
<p>but the pods created as a result are on pending status for the last hour. There is also no output when I enter <code>kubectl logs &lt;podname&gt; -n &lt;namespace&gt;</code> . There is also no such containers when I type <code>docker ps</code> or <code>docker ps -a</code> . I'm extremely new to Kubernetes and couldn't figure out the reason behind this.</p>
<p>output of <code>kubectl describe pod &lt;podname&gt; -n &lt;namespace&gt;</code> :</p>
<pre><code>Name:           testnode1-6c9d65ddf5-jj7dj
Namespace:      testlog
Priority:       0
Node:           &lt;none&gt;
Labels:         app=testnode1
                pod-template-hash=6c9d65ddf5
Annotations:    &lt;none&gt;
Status:         Pending
IP:
IPs:            &lt;none&gt;
Controlled By:  ReplicaSet/testnode1-6c9d65ddf5
Containers:
  testnode1:
    Image:      amazon/opendistro-for-elasticsearch:1.8.0
    Port:       &lt;none&gt;
    Host Port:  &lt;none&gt;
    Environment:
      ES_JAVA_OPTS:                  -Xms768m -Xmx768m
      MAX_LOCKED_MEMORY:             unlimited
      bootstrap.memory_lock:         true
      cluster.initial_master_nodes:  testnode1,testnode2,testnode3
      cluster.name:                  testcluster
      discovery.seed_hosts:          testnode1,testnode2,testnode3
      http.cors.allow-origin:        *
      network.host:                  0.0.0.0
      node.data:                     false
      node.name:                     testnode1
    Mounts:
      /usr/share/elasticsearch/data from testnode1-claim0 (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-gzmng (ro)
Conditions:
  Type           Status
  PodScheduled   False
Volumes:
  testnode1-claim0:
    Type:          HostPath (bare host directory volume)
    Path:          /logtest/es1
    HostPathType:  DirectoryOrCreate
  default-token-gzmng:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  default-token-gzmng
    Optional:    false
QoS Class:       BestEffort
Node-Selectors:  &lt;none&gt;
Tolerations:     node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
                 node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:
  Type     Reason            Age                  From               Message
  ----     ------            ----                 ----               -------
  Warning  FailedScheduling  4m2s (x62 over 85m)  default-scheduler  0/1 nodes are available: 1 node(s) had taint {node-role.kubernetes.io/master: }, that the pod didn't tolerate.
</code></pre>

Nyquillus
<p>The error in the message clearly shows what's wrong. The single node in your cluster is tainted with <code>{node-role.kubernetes.io/master: }</code>.</p>
<p>Run this command to remove the taint:</p>
<p><code>kubectl taint nodes --all node-role.kubernetes.io/master-</code></p>
<p>This is clearly mentioned <a href="https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/#control-plane-node-isolation" rel="nofollow noreferrer">here</a></p>
<p>Read more about Taints &amp; Tolerations <a href="https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/" rel="nofollow noreferrer">here</a></p>
