Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
6 contributors

Users who have contributed to this file

@ktsakalozos @twz123 @keshavdv @klarose @davefinster @balchua
166 lines (166 sloc) 3.28 KB
apiVersion: v1
kind: Namespace
metadata:
name: ingress
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: nginx-ingress-microk8s-serviceaccount
namespace: ingress
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: nginx-ingress-microk8s-clusterrole
rules:
- apiGroups:
- ""
resources:
- nodes
- services
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
- configmaps
- endpoints
- nodes
- pods
- secrets
verbs:
- list
- watch
- apiGroups:
- ""
resources:
- events
verbs:
- create
- patch
- apiGroups:
- extensions
- networking.k8s.io
resources:
- ingresses
verbs:
- get
- list
- watch
- apiGroups:
- extensions
- networking.k8s.io
resources:
- ingresses/status
verbs:
- update
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: nginx-ingress-microk8s-role
namespace: ingress
rules:
- apiGroups:
- ""
resources:
- configmaps
- endpoints
- pods
- secrets
verbs:
- get
- apiGroups:
- ""
resources:
- configmaps
resourceNames:
- ingress-controller-leader-nginx
verbs:
- create
- update
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: nginx-ingress-microk8s
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: nginx-ingress-microk8s-clusterrole
subjects:
- kind: ServiceAccount
name: nginx-ingress-microk8s-serviceaccount
namespace: ingress
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: nginx-ingress-microk8s
namespace: ingress
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: nginx-ingress-microk8s-role
subjects:
- kind: ServiceAccount
name: nginx-ingress-microk8s-serviceaccount
---
apiVersion: v1
kind: ConfigMap
metadata:
name: nginx-load-balancer-microk8s-conf
namespace: ingress
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: nginx-ingress-microk8s-controller
namespace: ingress
labels:
microk8s-application: nginx-ingress-microk8s
spec:
selector:
matchLabels:
name: nginx-ingress-microk8s
template:
metadata:
labels:
name: nginx-ingress-microk8s
spec:
terminationGracePeriodSeconds: 60
# hostPort doesn't work with CNI, so we have to use hostNetwork instead
# see https://github.com/kubernetes/kubernetes/issues/23920
dnsPolicy: ClusterFirstWithHostNet
hostNetwork: true
serviceAccountName: nginx-ingress-microk8s-serviceaccount
containers:
- image: quay.io/kubernetes-ingress-controller/nginx-ingress-controller-$ARCH:$TAG
name: nginx-ingress-microk8s
livenessProbe:
httpGet:
path: /healthz
port: 10254
scheme: HTTP
initialDelaySeconds: 30
timeoutSeconds: 5
# use downward API
env:
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
ports:
- containerPort: 80
- containerPort: 443
args:
- /nginx-ingress-controller
- --configmap=$(POD_NAMESPACE)/nginx-load-balancer-microk8s-conf
$EXTRA_ARGS
You can’t perform that action at this time.