Merge pull request #7105 from ollypom/updatekubeingress

Update UCP Kube Ingress Controller Guide
This commit is contained in:
Tammy Fox 2018-07-26 11:32:54 -04:00 committed by GitHub
commit 3c502121f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 19 additions and 14 deletions

View File

@ -25,7 +25,7 @@ Learn about [ingress in Kubernetes](https://v1-8.docs.kubernetes.io/docs/concept
## Create a dedicated namespace ## Create a dedicated namespace
1. Navigate to the **Namespaces** page and click **Create**. 1. Navigate to the **Namespaces** page, and click **Create**.
2. In the **Object YAML** editor, append the following text. 2. In the **Object YAML** editor, append the following text.
```yaml ```yaml
metadata: metadata:
@ -52,16 +52,15 @@ The default service account that's associated with the `ingress-nginx`
namespace needs access to Kubernetes resources, so create a grant with namespace needs access to Kubernetes resources, so create a grant with
`Restricted Control` permissions. `Restricted Control` permissions.
1. Navigate to the **Grants** page and click **Create Grant**. 1. From UCP, navigate to the **Grants** page, and click **Create Grant**.
2. In the left pane, click **Resource Sets**, and in the **Type** section, 2. Within the **Subject** pane, select **Service Account**. For the
click **Namespaces**. **Namespace** select **ingress-nginx**, and select **default** for
3. Enable the **Apply grant to all existing and new namespaces** option. the **Service Account**. Click **Next**.
4. In the left pane, click **Roles**. In the **Role** dropdown, select 3. Within the **Role** pane, select **Restricted Control**, and then click
**Restricted Control**. **Next**.
5. In the left pane, click **Subjects**, and select **Service Account**. 4. Within the **Resource Set** pane, select the **Type** **Namespace**, and
6. In the **Namespace** dropdown, select **ingress-nginx**, and in the select the **Apply grant to all existing and new namespaces** toggle.
**Service Account** dropdown., select **default**. 5. Click **Create**.
7. Click **Create**.
> Ingress and role-based access control > Ingress and role-based access control
> >
@ -84,7 +83,7 @@ Navigate to the **Create Kubernetes Object** page, and in the **Object YAML**
editor, paste the following YAML. editor, paste the following YAML.
```yaml ```yaml
apiVersion: extensions/v1beta1 apiVersion: apps/v1beta2
kind: Deployment kind: Deployment
metadata: metadata:
name: default-http-backend name: default-http-backend
@ -93,10 +92,15 @@ metadata:
namespace: ingress-nginx namespace: ingress-nginx
spec: spec:
replicas: 1 replicas: 1
selector:
matchLabels:
app: default-http-backend
template: template:
metadata: metadata:
labels: labels:
app: default-http-backend app: default-http-backend
annotations:
seccomp.security.alpha.kubernetes.io/pod: docker/default
spec: spec:
terminationGracePeriodSeconds: 60 terminationGracePeriodSeconds: 60
containers: containers:
@ -156,7 +160,7 @@ metadata:
name: udp-services name: udp-services
namespace: ingress-nginx namespace: ingress-nginx
--- ---
apiVersion: extensions/v1beta1 apiVersion: apps/v1beta2
kind: Deployment kind: Deployment
metadata: metadata:
name: nginx-ingress-controller name: nginx-ingress-controller
@ -173,6 +177,7 @@ spec:
annotations: annotations:
prometheus.io/port: '10254' prometheus.io/port: '10254'
prometheus.io/scrape: 'true' prometheus.io/scrape: 'true'
seccomp.security.alpha.kubernetes.io/pod: docker/default
spec: spec:
initContainers: initContainers:
- command: - command:
@ -186,7 +191,7 @@ spec:
privileged: true privileged: true
containers: containers:
- name: nginx-ingress-controller - name: nginx-ingress-controller
image: quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.10.2 image: quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.17.1
args: args:
- /nginx-ingress-controller - /nginx-ingress-controller
- --default-backend-service=$(POD_NAMESPACE)/default-http-backend - --default-backend-service=$(POD_NAMESPACE)/default-http-backend