【问题标题】:Coredns unable to depoyCoredns 无法部署
【发布时间】:2019-07-05 08:01:59
【问题描述】:

我已经安装了一个集群,但似乎无法配置 coredns 来运行。我在执行kubectl describe replicaset -n kube-system: 时收到以下消息

Error creating: pods "coredns-7945fb857d-" is forbidden: unable to validate against any pod security policy: [pod.metadata.annotations[seccomp.security.alpha.kubernetes.io/pod]: Forbidden:  is not an allowed seccomp profile. Valid values are runtime/default pod.metadata.annotations[container.apparmor.security.beta.kubernetes.io/coredns]: Forbidden: AppArmor profile must be set pod.metadata.annotations[container.seccomp.security.alpha.kubernetes.io/coredns]: Forbidden:  is not an allowed seccomp profile. Valid values are runtime/default spec.containers[0].securityContext.capabilities.add: Invalid value: "NET_BIND_SERVICE": capability may not be added

谁能指出我正确的方向

【问题讨论】:

  • 您是否已经部署了您的 pod 网络插件?
  • 是的,Calico 和它的 pod 被创建 kubectl get pods -n kube-system NAME READY STATUS RESTARTS AGE calico-kube-controllers-59f54d6bbc-8wv5t 1/1 Running 0 5h51m

标签: kubernetes coredns


【解决方案1】:

可能是因为Pod Security Policy,甚至没有创建 coreDNS pod:

PodSecurityPolicies 是强制执行的 (...),但在未授权任何策略的情况下执行此操作将阻止在集群中创建任何 pod。

在这种特定情况下,抱怨 Seccomp 注释中的配置文件无效:

[seccomp.security.alpha.kubernetes.io/pod]:禁止:不是允许的 seccomp 配置文件。

您可以查看here a list of valid profilesexample of a custom one

【讨论】:

    猜你喜欢
    • 2021-05-19
    • 1970-01-01
    • 2022-01-11
    • 2020-10-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多