Compare commits

..

No commits in common. "b4a9b30a3facddc80687f6ea6306cc364baa3f0a" and "1e9169fcd502adf306e39dd752e8f6215a2b4fe5" have entirely different histories.

7 changed files with 10 additions and 125 deletions

View File

@ -57,8 +57,8 @@ http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-da
scp haproxy.conf root@ssh root@$(hetzner-kube cluster master-ip k8s-test):
ssh root@$(hetzner-kube cluster master-ip k8s-test)
apt install -y haproxy
mv haproxy.cfg /etc/haproxy/haproxy.cfg
apt install haproxy
mv haproxy.conf /etc/haproxy/haproxy.cfg
systemctl restart haproxy
### frontend LB variante 2
@ -66,22 +66,6 @@ http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-da
ssh root@$(hetzner-kube cluster master-ip k8s-test) apt install -y python
ansible-playbook -i "$(hetzner-kube cluster master-ip k8s-test)," -u root ansible-haproxy.yaml
## static page
kubectl apply -f staticpage.yaml
kubectl proxy
http://localhost:8001/api/v1/namespaces/testsite/pods/http:static-nginx:/proxy/#!
### add ingress
kubectl apply -f staticpage-ingress.yaml
## set up SSL
### add ssl to testsite
kubectl apply -f staticpage-ingress-ssl.yaml
## test deployment
helm install --namespace k8spress --name wordpress -f helm-wordpress.yaml stable/wordpress

View File

@ -186,7 +186,7 @@ subjects:
---
apiVersion: apps/v1
kind: DaemonSet
kind: Deployment
metadata:
name: nginx-ingress-controller
namespace: ingress-nginx
@ -194,6 +194,11 @@ metadata:
app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/part-of: ingress-nginx
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/part-of: ingress-nginx
template:
metadata:
labels:
@ -256,4 +261,5 @@ spec:
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 10
---

View File

@ -18,7 +18,6 @@ spec:
port: 443
targetPort: 443
protocol: TCP
nodePort: 30181
selector:
app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/part-of: ingress-nginx

View File

@ -171,7 +171,7 @@ spec:
cephVersion:
# For the latest ceph images, see https://hub.docker.com/r/ceph/ceph/tags
image: ceph/ceph:v13.2.4-20190109
dataDirHostPath: /ceph
dataDirHostPath: /rook
dashboard:
enabled: true
mon:

View File

@ -1,37 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: web-service
namespace: testsite
spec:
ports:
- port: 80
protocol: TCP
targetPort: 80
name: http
selector:
app: web-backend
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: testsite-ingress
namespace: testsite
annotations:
kubernetes.io/ingress.class: "nginx"
certmanager.k8s.io/cluster-issuer: letsencrypt-staging
certmanager.k8s.io/acme-challenge-type: http01
spec:
rules:
- host: test.k.zknt.org
http:
paths:
- backend:
serviceName: web-service
servicePort: 80
path: /
tls:
- hosts:
- test.k.zknt.org
secretName: testsite-certificate

View File

@ -1,27 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: web-service
namespace: testsite
spec:
ports:
- port: 80
protocol: TCP
targetPort: 80
selector:
app: web-backend
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: testsite-ingress
namespace: testsite
spec:
rules:
- host: test.k.zknt.org
http:
paths:
- backend:
serviceName: web-service
servicePort: 80
path: /

View File

@ -1,40 +0,0 @@
apiVersion: v1
kind: Namespace
metadata:
name: testsite
---
apiVersion: v1
kind: ConfigMap
metadata:
name: webdir
namespace: testsite
data:
index.html: |
<html>
<head>
<title>Blank page</title>
</head>
<body>
Nothing here to see.
</body>
</html>
---
apiVersion: v1
kind: Pod
metadata:
name: static-nginx
namespace: testsite
labels:
app: web-backend
spec:
containers:
- name: webserver
image: nginx:alpine
volumeMounts:
- name: webdir
mountPath: /usr/share/nginx/html
volumes:
- name: webdir
configMap:
name: webdir