[英]In GCP Kubernetes (GKE) how do I assign a stateless pod created by a deployment to a provisioned vm
I have several operational deployments on minikube locally and am trying to deploy them on GCP with kubernetes. 我在本地的minikube上进行了几项操作部署,并且正在尝试使用kubernetes在GCP上进行部署。
When I describe a pod created by a deployment (which created a replication set that spawned the pod): 当我描述由部署创建的容器(该容器创建了一个生成该容器的复制集)时:
kubectl get po redis-sentinel-2953931510-0ngjx -o yaml
It indicates it landed on one of the kubernetes vms. 它表明它已落在kubernetes虚拟机之一上。
I'm having trouble with deployments that work separately failing due to lack of resources eg cpu even though I provisioned a VM above the requirements. 我遇到了由于资源不足(例如cpu)而无法单独工作的部署的问题,即使我提供了超出要求的VM。 I suspect the cluster is placing the pods on it's own nodes and running out of resources.
我怀疑集群正在将Pod放置在其自己的节点上,并且资源不足。
How should I proceed? 我应该如何进行?
Do I introduce a vm to be orchestrated by kubernetes? 我是否会引入一个由kubernetes协调的虚拟机? Do I enlarge the kubernetes nodes?
我是否要扩大kubernetes节点? Or something else all together?
还是其他东西在一起?
It was a resource problem and node pool size was inhibiting the deployments.I was mistaken in trying to provide google compute instances and disks. 这是一个资源问题,节点池的大小限制了部署。我在尝试提供谷歌计算实例和磁盘时弄错了。
I ended up provisioning Kubernetes node pools with more cpu and disk space and solved it. 我最终为Kubernetes节点池配置了更多的cpu和磁盘空间,并解决了它。 I also added elasticity by provisioning autoscaling.
我还通过设置自动缩放功能增加了弹性。
here is a node pool documentation 这是节点池文档
here is a terraform Kubernetes deployment 这是一个Terraform Kubernetes部署
here is the machine type documentation 这是机器类型文档
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.