Skip to content

Commit bbe5a01

Browse files
Changes to leverage newer version of minikube
1 parent 7e0bd04 commit bbe5a01

6 files changed

+36
-17
lines changed

k8s/gateway-deployment.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,4 @@ spec:
5757
targetPort: 8080
5858
selector:
5959
app: gateway
60-
type: NodePort
60+
type: LoadBalancer

k8s/ingress.yaml

+28-10
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,44 @@
1-
apiVersion: networking.k8s.io/v1beta1
1+
apiVersion: networking.k8s.io/v1
22
kind: Ingress
33
metadata:
44
name: gateway-ingress
55
annotations:
66
nginx.ingress.kubernetes.io/rewrite-target: /
77
spec:
8-
backend:
9-
serviceName: default-http-backend
10-
servicePort: 80
8+
defaultBackend:
9+
service:
10+
name: gateway
11+
port:
12+
number: 8080
1113
rules:
1214
- host: microservices-cluster.info
1315
http:
1416
paths:
1517
- path: /employee
1618
backend:
17-
serviceName: employee
18-
servicePort: 8080
19+
service:
20+
name: employee
21+
port:
22+
number: 8080
23+
pathType: Prefix
1924
- path: /department
2025
backend:
21-
serviceName: department
22-
servicePort: 8080
26+
service:
27+
name: department
28+
port:
29+
number: 8080
30+
pathType: Prefix
2331
- path: /organization
2432
backend:
25-
serviceName: organization
26-
servicePort: 8080
33+
service:
34+
name: organization
35+
port:
36+
number: 8080
37+
pathType: Prefix
38+
- path: /gateway
39+
backend:
40+
service:
41+
name: gateway
42+
port:
43+
number: 8080
44+
pathType: ImplementationSpecific

readme.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
55
### Java Microservices with Spring Boot and Spring Cloud Kubernetes
66

7-
This is repository accompanies my article for the `Tanzu Development Center` - [Microservices with Spring Cloud Kubernetes Reference Architecture](https://tanzu.vmware.com/developer/guides/preparing-and-deploying-kubernetes-workloads/)
7+
This is repository accompanies my article for the `Tanzu Development Center` - [Microservices with Spring Cloud Kubernetes Reference Architecture](https://tanzu.vmware.com/developer/guides/app-enhancements-spring-k8s//)
88

99
This Reference Architecture demonstrates design, development, and deployment of
1010
[Spring Boot](https://spring.io/projects/spring-boot) microservices on

scripts/gateway-open.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ set -x
44

55
. ./set-env.sh
66

7-
open $(minikube service gateway --url -n=$NAMESPACE_GATEWAY)/swagger-ui.html
7+
#xdg-open $(minikube service gateway --url -n=$NAMESPACE_GATEWAY)/swagger-ui.html
88

9-
#kubectl get pod -n $NAMESPACE_GATEWAY -l 'app=gateway' --no-headers | awk '{print $1}' | xargs -I {} sh -c "echo {}; open $(minikube service gateway --url -n gateway)/swagger-ui.html"
9+
kubectl get pod -n $NAMESPACE_GATEWAY -l 'app=gateway' --no-headers | awk '{print $1}' | xargs -I {} sh -c "echo {}; xdg-open $(minikube service gateway --url -n gateway)/swagger-ui.html"

scripts/install-app.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ set -x
66
. ./set-env.sh
77

88

9-
minikube addons enable ingress
9+
#minikube addons enable ingress
1010

1111
cd ../k8s
1212

@@ -30,5 +30,6 @@ minikube profile $CLUSTER1_NAME
3030
CLUSTER1_IP=$(minikube ip)
3131
echo $CLUSTER1_IP
3232
sudo sed -i.bak 's/.*microservices-cluster.info/'"$CLUSTER1_IP"' microservices-cluster.info/' /etc/hosts && sudo rm /etc/hosts.bak
33+
echo "$(minikube ip) microservices-cluster.info" | sudo tee -a /etc/hosts
3334

3435
cd ../scripts

scripts/start-cluster.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/bin/bash
22

33
set -e
44
set -x
@@ -13,4 +13,4 @@ minikube addons enable metrics-server
1313
eval $(minikube docker-env)
1414

1515
kubectl config use-context $CLUSTER1_NAME
16-
minikube -p $CLUSTER1_NAME dashboard
16+
minikube -p $CLUSTER1_NAME tunnel dashboard

0 commit comments

Comments
 (0)