Files
kubernetes/pkg/api
Kubernetes Submit Queue 59b1f4a12e Merge pull request #39473 from php-coder/improve_err_msg_about_privileged
Automatic merge from submit-queue (batch tested with PRs 39394, 38270, 39473, 39516, 36243)

Improve an error message when privileged containers are disallowed on the cluster

**What this PR does / why we need it**:

At present when user creates privileged pod and creation of privileged containers disallowed globally by a system administrator (kubelet and api-server were running with `--allow-privileged=false`), user will get the following error message:
```console
$ kubectl create -f nginx.pod 
The Pod "nginx" is invalid: spec.containers[0].securityContext.privileged: Forbidden: disallowed by policy
```
"Disallowed by policy" may give a wrong assumption to a user that creation of privileged containers disallowed by [`PodSecurityPolicy`](http://kubernetes.io/docs/user-guide/pod-security-policy/) while it's not.

This commit improves error message and tries to point user to the right direction:
```console
$ kubectl create -f nginx.pod 
The Pod "nginx" is invalid: spec.containers[0].securityContext.privileged: Forbidden: privileged containers are disallowed on this cluster by a system administrator
```

**Release note**:

```release-note
NONE
```

PTAL @pweil-
2017-01-09 12:05:21 -08:00
..
2017-01-05 14:14:13 -08:00
2017-01-05 14:14:13 -08:00
2017-01-05 14:14:13 -08:00
2017-01-05 14:14:13 -08:00
2017-01-05 14:14:13 -08:00
2016-12-03 19:10:46 -05:00
2016-11-23 22:30:47 -06:00
2016-12-03 19:10:46 -05:00
2016-07-16 13:48:21 -04:00
2016-12-03 19:10:46 -05:00
2016-11-23 22:30:47 -06:00
2016-09-28 10:53:30 -07:00
2016-11-18 15:15:46 -08:00
2016-12-03 19:10:46 -05:00
2016-11-23 22:30:47 -06:00
2016-12-03 19:10:46 -05:00
2016-12-03 19:10:46 -05:00