Added basic setup for master and certification material
This commit is contained in:
37
files/LFS258/SOLUTIONS/s_11/ingress.rbac.yaml
Normal file
37
files/LFS258/SOLUTIONS/s_11/ingress.rbac.yaml
Normal file
@@ -0,0 +1,37 @@
|
||||
kind: ClusterRole
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: traefik-ingress-controller
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- services
|
||||
- endpoints
|
||||
- secrets
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- extensions
|
||||
resources:
|
||||
- ingresses
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
---
|
||||
kind: ClusterRoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: traefik-ingress-controller
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: traefik-ingress-controller
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: traefik-ingress-controller
|
||||
namespace: kube-system
|
||||
|
||||
16
files/LFS258/SOLUTIONS/s_11/ingress.rule.yaml
Normal file
16
files/LFS258/SOLUTIONS/s_11/ingress.rule.yaml
Normal file
@@ -0,0 +1,16 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: ingress-test
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: traefik
|
||||
spec:
|
||||
rules:
|
||||
- host: www.example.com
|
||||
http:
|
||||
paths:
|
||||
- backend:
|
||||
serviceName: secondapp
|
||||
servicePort: 80
|
||||
path: /
|
||||
|
||||
22
files/LFS258/SOLUTIONS/s_11/ingress.yaml
Normal file
22
files/LFS258/SOLUTIONS/s_11/ingress.yaml
Normal file
@@ -0,0 +1,22 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: ingress-test
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: nginx
|
||||
namespace: default
|
||||
spec:
|
||||
rules:
|
||||
- host: www.external.com
|
||||
http:
|
||||
paths:
|
||||
- backend:
|
||||
service:
|
||||
name: web-one
|
||||
port:
|
||||
number: 80
|
||||
path: /
|
||||
pathType: ImplementationSpecific
|
||||
status:
|
||||
loadBalancer: {}
|
||||
|
||||
9
files/LFS258/SOLUTIONS/s_11/setupLinkerd.txt
Normal file
9
files/LFS258/SOLUTIONS/s_11/setupLinkerd.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
curl -sL run.linkerd.io/install | sh
|
||||
export PATH=$PATH:/home/student/.linkerd2/bin
|
||||
linkerd check --pre
|
||||
linkerd install | kubectl apply -f -
|
||||
linkerd check
|
||||
linkerd viz install | kubectl apply -f -
|
||||
linkerd viz check
|
||||
linkerd viz dashboard &
|
||||
|
||||
58
files/LFS258/SOLUTIONS/s_11/traefik-ds.yaml
Normal file
58
files/LFS258/SOLUTIONS/s_11/traefik-ds.yaml
Normal file
@@ -0,0 +1,58 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: traefik-ingress-controller
|
||||
namespace: kube-system
|
||||
---
|
||||
kind: DaemonSet
|
||||
apiVersion: apps/v1
|
||||
metadata:
|
||||
name: traefik-ingress-controller
|
||||
namespace: kube-system
|
||||
labels:
|
||||
k8s-app: traefik-ingress-lb
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
name: traefik-ingress-lb
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
k8s-app: traefik-ingress-lb
|
||||
name: traefik-ingress-lb
|
||||
spec:
|
||||
serviceAccountName: traefik-ingress-controller
|
||||
terminationGracePeriodSeconds: 60
|
||||
hostNetwork: True
|
||||
containers:
|
||||
- image: traefik:1.7.13
|
||||
name: traefik-ingress-lb
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 80
|
||||
hostPort: 80
|
||||
- name: admin
|
||||
containerPort: 8080
|
||||
hostPort: 8080
|
||||
args:
|
||||
- --api
|
||||
- --kubernetes
|
||||
- --logLevel=INFO
|
||||
---
|
||||
kind: Service
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: traefik-ingress-service
|
||||
namespace: kube-system
|
||||
spec:
|
||||
selector:
|
||||
k8s-app: traefik-ingress-lb
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 80
|
||||
name: web
|
||||
- protocol: TCP
|
||||
port: 8080
|
||||
name: admin
|
||||
|
||||
Reference in New Issue
Block a user