This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
services: | |
calificaciones-api: | |
container_name: calificaciones-api | |
restart: always | |
image: ualmtorres/calificaciones-api:v0 | |
ports: | |
- "80:80" | |
volumes: | |
- ./api:/var/www/html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Injectable } from '@nestjs/common'; | |
@Injectable() | |
export class BooksService { | |
findAll(): any { | |
return 'findAll funcionando'; | |
} | |
findBook(bookId: string): any { | |
return `findBook funcionando con ${bookId}`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
kubectl apply -f deployment-sgbd.yml | |
kubectl apply -f deployment-sgapi.yml | |
kubectl apply -f deployment-sgapp.yml | |
kubectl apply -f services.yml | |
kubectl get deployments -n demo --watch | |
kubectl get services -n demo --watch | |
EXTERNAL_IP=`kubectl get services -n demo | grep "sgapp" | awk '{print $4}'` | |
echo -e "Abre en un navegador la EXTERNAL-IP: \033[0;31m${EXTERNAL_IP} \033[0;39m del servicio sgapp" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: autoscaling/v1 | |
kind: HorizontalPodAutoscaler | |
metadata: | |
name: sgapi | |
namespace: demo | |
spec: | |
scaleTargetRef: | |
apiVersion: apps/v1beta1 | |
kind: Deployment | |
name: sgapi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
kubectl apply -f deployment-sgbd.yml | |
kubectl apply -f deployment-sgapi.yml | |
kubectl apply -f deployment-sgapp.yml | |
kubectl apply -f services.yml | |
kubectl get deployments -n demo --watch | |
kubectl get services -n demo --watch | |
EXTERNAL_IP=`kubectl get services -n demo | grep "sgapp" | awk '{print $4}'` | |
echo -e "Abre en un navegador la EXTERNAL-IP: \033[0;31m${EXTERNAL_IP} \033[0;39m del servicio sgapp" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: mysql | |
namespace: demo | |
spec: | |
type: ClusterIP | |
ports: | |
- port: 3306 | |
selector: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
kubectl apply -f deployment-sgbd.yml | |
kubectl apply -f deployment-sgapi.yml | |
kubectl apply -f deployment-sgapp.yml | |
kubectl get deployments -n demo --watch | |
sudo kubectl port-forward -n demo `kubectl get pods -n demo | grep 'sgapp' | awk '{print $1}'` 80:80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: sgapp | |
namespace: demo | |
labels: | |
app: sgapp | |
spec: | |
revisionHistoryLimit: 2 | |
strategy: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: sgapi | |
namespace: demo | |
labels: | |
app: sgapi | |
spec: | |
revisionHistoryLimit: 2 | |
strategy: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: mysql | |
namespace: demo | |
spec: | |
selector: | |
matchLabels: | |
app: mysql | |
template: |
NewerOlder