Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
266 views
in Technique[技术] by (71.8m points)

asp.net - 无法运行kubenetes部署(Cannot run kubenetes deployments)

I configuring kubernetes to have 3 images (my API, Elastic Search and Kibana)

(我将kubernetes配置为具有3张图像(我的API,Elastic Search和Kibana))

Here is my deployment.yml file

(这是我的deployment.yml文件)

 apiVersion: apps/v1
kind: Deployment
metadata:
  name: tooseeweb-deployment
spec:
  selector:
    matchLabels:
      app: tooseeweb-pod
  template:
    metadata:
      labels:
        app: tooseeweb-pod
    spec: 
      containers:
      - name: tooseewebcontainer
        image: tooseewebcontainer:v1
        resources:
          limits:
            memory: "128Mi"
            cpu: "500m"
        ports:
        - containerPort: 80
      - name: elasticsearch
        image: docker.elastic.co/elasticsearch/elasticsearch:6.2.4
        resources:
          limits:
            memory: "128Mi"
            cpu: "500m"
        ports:
        - containerPort: 9200
      - name: kibana
        image: docker.elastic.co/kibana/kibana:6.2.4
        resources:
          limits:
            memory: "128Mi"
            cpu: "500m"
        ports:
        - containerPort: 5601

When I run kubectl get deployments I see this

(当我运行kubectl get deployments我看到了)

在此处输入图片说明

It's stuck on 0/1 ready.

(它停留在0/1就绪状态。)

I try to reboot docker, etc. It not helps.

(我尝试重新启动docker等。这没有帮助。)

How I can fix this?

(我该如何解决?)

UPDATE

(更新)

I run kubectl describe pod and have this error

(我运行kubectl describe pod并出现此错误)

Warning  FailedScheduling  19s   default-scheduler  0/1 nodes are available: 1 Insufficient cpu.

How I can fix this?

(我该如何解决?)

  ask by Eugene Sukh translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Remove these resource limits in every pods.

(删除每个吊舱中的这些资源限制。)

resources:
   limits:
      memory: "128Mi"
      cpu: "500m"

If you want to limit the resources do it later after applying once the deployment successfully.

(如果您想限制资源,请在成功部署后再应用。)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...