Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
基本上需要一种使用 GoLang API 为 Pod 设置节点选择器的方法
Pod.Spec.NodeSelector["failure-domain.beta.kubernetes.io/zone"] = zone出现错误
您应该在设置地图之前对其进行初始化。像这样的东西
pod.Spec.NodeSelector = make(map[string]string) pod.Spec.NodeSelector["failure-domain.beta.kubernetes.io/zone"] = "zone1"