Commit 3fcb0484 authored by Jose Ernesto Suarez's avatar Jose Ernesto Suarez

Ajustes para el ingress

parent 27e57868
apiVersion: v1
kind: Service
metadata:
name: app-final-service
spec:
type: LoadBalancer
selector:
app: app-final
ports:
- protocol: TCP
port: 80
targetPort: foreman-port
\ No newline at end of file
......@@ -86,17 +86,3 @@ spec:
- name: activestorage
persistentVolumeClaim:
claimName: rails-activestorage-claim
#Montar el Liveness
---
apiVersion: v1
kind: Service
metadata:
name: app-final-service
spec:
type: LoadBalancer
selector:
app: app-final
ports:
- protocol: TCP
port: 80
targetPort: foreman-port
\ No newline at end of file
......@@ -3,52 +3,22 @@ kind: Service
metadata:
name: app-final-service
spec:
type: ClusterIP
selector:
app: app-final
ports:
- protocol: TCP
port: 80
targetPort: foreman-port
---
apiVersion: v1
kind: Service
metadata:
name: first-app-service
spec:
type: ClusterIP
selector:
app: firstapp
ports:
- protocol: TCP
port: 80
targetPort: nodejs-port
port: 5000
---
apiVersion: v1
kind: Service
metadata:
name: first-deploy-service
spec:
type: ClusterIP
selector:
app: firstdeploy
ports:
- protocol: TCP
port: 80
targetPort: nodejs-port
---
apiVersion: v1
kind: Service
metadata:
name: awesome-service
spec:
type: ClusterIP
selector:
app: firstapp
ports:
- protocol: TCP
port: 80
targetPort: nodejs-port
port: 3000
---
apiVersion: v1
kind: Service
......@@ -56,23 +26,19 @@ metadata:
name: cool-app
spec:
type:
type: ClusterIP
selector:
app: rails
ports:
- protocol: TCP
port: 80
targetPort: rails-port
port: 3000
---
apiVersion: v1
kind: Service
metadata:
name: sinatra
spec:
type: ClusterIP
selector:
app: sinatra
ports:
- protocol: TCP
port: 80
targetPort: 4567
\ No newline at end of file
port: 4567
\ No newline at end of file
kubectl apply -f ../3.deployments/first-app-deployment.yaml
kubectl apply -f ../6.secrets/cool-app.yaml
kubectl apply -f ../9.configmaps/sinatra.yaml
kubectl apply -f ../11.app-final/mysql-configmap.yaml
kubectl apply -f ../11.app-final/mysql-secret.yaml
kubectl apply -f ../11.app-final/mysql-storage.yaml
kubectl apply -f ../11.app-final/mysql.yaml
kubectl apply -f ../11.app-final/app-config.yaml
kubectl apply -f ../11.app-final/app-storage.yaml
kubectl apply -f ../11.app-final/app.yaml
kubectl apply -f ./app-services.yaml
\ No newline at end of file
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: ingress-resource
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/ssl-redirect: "false"
spec:
rules:
- http:
paths:
- path: /hello
backend:
serviceName: hello-app
servicePort: 8080
\ No newline at end of file
......@@ -3,10 +3,10 @@ kind: Ingress
metadata:
name: ingress-frontend
annotations:
nginx.ingress.kubernetes.io/auth-type: basic
nginx.ingress.kubernetes.io/auth-secret: basic-auth
nginx.ingress.kubernetes.io/auth-realm: 'Authentication Required - Service'
kubernetes.io/ingress.class: gce
#nginx.ingress.kubernetes.io/auth-type: basic
#nginx.ingress.kubernetes.io/auth-secret: basic-auth
#nginx.ingress.kubernetes.io/auth-realm: 'Authentication Required - Service'
kubernetes.io/ingress.class: nginx
spec:
tls:
- hosts:
......@@ -19,25 +19,25 @@ spec:
- path: /
backend:
serviceName: cool-app
servicePort: 80
servicePort: 3000
- host: deploy.edu.wedoops.io
http:
paths:
- path: /
backend:
serviceName: first-deploy-service
servicePort: 80
servicePort: 3000
- host: sinatra.edu.wedoops.io
http:
paths:
- path: /
backend:
serviceName: sinatra
servicePort: 80
servicePort: 4567
- host: final.edu.wedoops.io
http:
paths:
- path: /
backend:
serviceName: app-final-service
servicePort: 80
\ No newline at end of file
servicePort: 5000
\ No newline at end of file
apiVersion: v1
data:
auth: RWwuY3Vyc28uZGUuRGVjZW0uaGEuZXN0YWRvLmdlbmlhbA==
auth: YWRtaW46RWwuY3Vyc28uZGUuRGVjZW0uaGEuZXN0YWRvLmdlbmlhbA==
kind: Secret
metadata:
name: basic-auth
......
#!/bin/bash
docker run -it --rm --name certbot \
-v "/Users/ernesto/Code/SRE/certbot/etc:/etc/letsencrypt" \
-v "/Users/ernesto/Code/SRE/certbot/lib:/var/lib/letsencrypt" \
certbot/certbot certonly --manual --preferred-challenges dns
echo "PASS: $(kubectl get secret basic-auth -o jsonpath="{.data.auth}" | base64 --decode)"
\ No newline at end of file
apiVersion: v1
kind: Service
metadata:
name: sinatra
spec:
type: LoadBalancer
selector:
app: sinatra
ports:
- protocol: TCP
port: 80
targetPort: 4567
\ No newline at end of file
......@@ -19,16 +19,3 @@ spec:
envFrom:
- configMapRef:
name: backend-config
---
apiVersion: v1
kind: Service
metadata:
name: sinatra
spec:
type: LoadBalancer
selector:
app: sinatra
ports:
- protocol: TCP
port: 80
targetPort: 4567
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment