检测到您已登录华为云国际站账号,为了您更好的体验,建议您访问国际站服务网站 https://www.huaweicloud.com/intl/zh-cn
不再显示此消息
器执行重启操作;若容器的存活检查成功则不执行任何操作。 就绪探针:readinessProbe,用于检查用户业务是否就绪,如果未就绪,则不转发流量到当前实例。一些程序的启动时间可能很长,比如要加载磁盘数据或者要依赖外部的某个模块启动完成才能提供服务。这时候程序进程在,但是并不能对
alpha.kubernetes.io/nginx: runtime/default labels: app: nginx-seccomp spec: containers: - name: nginx image: nginx 不符合策略实例的资源定义 示例中的container
namespace: whtest # 可选。指定路由要绑定的网关所在的命名空间。未指定,则默认是取路由所在的命名空间。 hostnames: ["nginx.example.com"] # 可选。 rules: - matches: - path: type:
Service name: nginx-v1 # nginx-v1服务的服务名 port: 5566 # nginx-v1服务的服务端口 weight: 30 # nginx-v1服务的流量比例 - group:
metadata: name: nginx-volume-types-allowed labels: app: nginx-volume-types spec: containers: - name: nginx image: nginx volumeMounts:
containers: - name: nginx image: nginx 不符合策略实例的资源定义 示例中hostPID和hostIPC均为true,不符合策略实例。 apiVersion: v1 kind: Pod metadata: name: nginx-host-namespace-disallowed
metadata: name: nginx-privileged-allowed labels: app: nginx-privileged spec: containers: - name: nginx image: nginx securityContext:
name: nginx image: nginx 不符合策略实例的资源定义 Pod的automountServiceAccountToken字段设为true,不符合策略实例。 apiVersion: v1 kind: Pod metadata: name: nginx-au
name: nginx-forbidden-sysctls-disallowed labels: app: nginx-forbidden-sysctls spec: containers: - name: nginx image: nginx securityContext:
beta.kubernetes.io/nginx: runtime/default labels: app: nginx-apparmor spec: containers: - name: nginx image: nginx 不符合策略实例的资源定义 示例
app: nginx replicas: 3 template: metadata: labels: app: nginx spec: containers: - name: nginx
metadata: name: nginx-readonlyrootfilesystem-allowed labels: app: nginx-readonlyrootfilesystem spec: containers: - name: nginx image:
name: nginx-host-filesystem labels: app: nginx-host-filesystem-disallowed spec: containers: - name: nginx image: nginx
name: nginx-privilege-escalation-allowed labels: app: nginx-privilege-escalation spec: containers: - name: nginx image: nginx
apiVersion: v1 kind: Pod metadata: name: nginx-host-networking-ports-allowed labels: app: nginx-host-networking-ports spec: hostNetwork:
metadata: name: nginx-proc-mount-disallowed labels: app: nginx-proc-mount spec: containers: - name: nginx image: nginx securityContext:
name: nginx-flexvolume-driver-allowed labels: app: nginx-flexvolume-driver spec: containers: - name: nginx image: nginx volumeMounts:
Server中增加华为云的DNS转发器。 配置DNS服务器 配置DNS转发:在DNS服务器配置相应的DNS转发规则,将解析华为云内网域名的请求转发到DNS终端节点。以常见的DNS软件Bind为例:例如/etc/named.conf内,增加DNS转发器的配置,forwarders为DNS终端节点IP地址。
metadata: name: nginx-selinux-allowed labels: app: nginx-selinux spec: containers: - name: nginx image: nginx securityContext:
略实例。 apiVersion: v1 kind: Pod metadata: name: nginx-users-allowed labels: app: nginx-users spec: securityContext: supplementalGroups: