绕过 Kubernetes 中的调度程序

绕过 Kubernetes 中的调度程序

昨晚我们在 k8s 灾难期间遇到了这个问题,调度程序没有响应我们的 apt 请求,那么有没有办法绕过 k8s 调度程序并直接在 k8s 集群上部署?以下是我们从中获得的日志:

E0528 08:41:48.775507       1 runtime.go:78] Observed a panic: &errors.errorString{s:"feature \"PodOverhead\" is not registered in FeatureGate \"k8s.io/apiserver/pkg/util/feature/feature_gate.go:28\""} (feature "PodOverhead" is not registered in FeatureGate "k8s.io/apiserver/pkg/util/feature/feature_gate.go:28")
goroutine 1 [running]:
k8s.io/apimachinery/pkg/util/runtime.logPanic(0x153ddc0, 0xc00027a380)
    /go/src/sigs.k8s.io/descheduler/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:74 +0x95
k8s.io/apimachinery/pkg/util/runtime.HandleCrash(0x0, 0x0, 0x0)
    /go/src/sigs.k8s.io/descheduler/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:48 +0x89
panic(0x153ddc0, 0xc00027a380)
    /usr/local/go/src/runtime/panic.go:969 +0x1b9
k8s.io/component-base/featuregate.(*featureGate).Enabled(0xc0003a5140, 0x171d05b, 0xb, 0x0)
    /go/src/sigs.k8s.io/descheduler/vendor/k8s.io/component-base/featuregate/feature_gate.go:302 +0x237
sigs.k8s.io/descheduler/pkg/utils.PodRequestsAndLimits(0xc000210fa0, 0x157c, 0x6)
    /go/src/sigs.k8s.io/descheduler/pkg/utils/pod.go:142 +0x5dd

答案1

找到一种方法是使用 k8s 功能,如节点亲和性和反亲和性,您可以在此处阅读有关它的更多信息:https://kubernetes.io/blog/2017/03/advanced-scheduling-in-kubernetes/

相关内容