<p>I have tried to run this YAML fine, but I am getting the below issue
1 master <code>2</code> nodes has been configured and  I ran kubectl get nodes output looks fine</p>

<pre><code>kubectl apply -f https://k8s.io/examples/application/deployment.yaml
</code></pre>

<p>then I have downloaded the file locally and tried, but again same error </p>

<p><code>Error</code> from server (Forbidden) :</p>

<blockquote>
  <p>deployments.extensions "nginx-deployment" is 
  forbidden: User "system:node:master" cannot get deployments.extensions in the 
    namespace "default"
    root@master:~#</p>
</blockquote>

<p>Please assist me to resolve the issue</p>

Manikandan
<p>This is a RBAC restriction about which you can read on <a href="https://kubernetes.io/docs/reference/access-authn-authz/rbac/" rel="nofollow noreferrer">Kubernetes - Using RBAC Authorization</a> docs.</p>

<p>You want to create your own <code>ServiceAccount</code> then <code>Role</code> and then bind them 
together using <code>RoleBinding</code>.</p>

<blockquote>
  <p>ServiceAccount example</p>
</blockquote>

<pre><code>apiVersion: v1
kind: ServiceAccount
metadata:
  name: some-name
  namespace: my-name
</code></pre>

<blockquote>
  <p>Role example</p>
</blockquote>

<pre><code>apiVersion: rbac.authorization.k8s.io/v1beta1
kind: Role
metadata:
  name: some-name
  namespace: my-name
rules:
  - apiGroups: ["extensions"]
    resources: ["deployments"]
    verbs: ["get","list","patch","update"]
</code></pre>

<blockquote>
  <p>RoleBinding example</p>
</blockquote>

<pre><code>apiVersion: rbac.authorization.k8s.io/v1beta1
kind: RoleBinding
metadata:
  name: some-name
  namespace: my-name
subjects:
  - kind: ServiceAccount
    name: some-name
    namespace: my-name
roleRef:
  kind: Role
  name: some-name
  apiGroup: rbac.authorization.k8s.io
</code></pre>

<p>There are examples online which you can find.</p>
