Published on 00/00/0000
Last updated on 00/00/0000
Published on 00/00/0000
Last updated on 00/00/0000
Share
Share
11 min read
Share
To learn more about Kubernetes ingress APIs and controllers, check out this blog post: Kubernetes ingress, deep dive. If you are interested in Istio's Ingress implementation in more detail, please refer to this post: An in-depth intro to Istio Ingress.The Istio ingress is an API gateway implementation which accepts client calls and routes them to the application services inside the mesh. Let's see how the features of an Istio ingress gateway can provide compared to a typical API Gateway:
It is important to note here that Backyards' lightweight API gateway solution is 100% compatible with, and based on, Istio's ingress gateway. So all the features provided by Istio ingress are available, as should be the case for the future.The Backyards API gateway dashboard gives you a monitoring and management interface for your Istio gateways with the following features:
If you need a hand with that, you can create a cluster with our free version of Banzai Cloud's Pipeline platform.
KUBECONFIG
at your cluster.hipstershop
namespace for our example applications:
kubectl create ns hipstershop
hipstershop
namespace:
backyards sidecar-proxy auto-inject on hipstershop
hipstershop
namespace has the necessary istio-injection=enabled
label. (If it is not there yet, wait a few seconds and check again.)
kubectl get ns hipstershop --show-labels
hipstershop
namespace:
kubectl -n=hipstershop apply -f https://raw.githubusercontent.com/GoogleCloudPlatform/microservices-demo/master/release/kubernetes-manifests.yaml
kubectl -n=hipstershop get po
NAME READY STATUS RESTARTS AGE
adservice-687b58699c-x7l5t 2/2 Running 0 113s
cartservice-778cffc8f6-tzmgf 2/2 Running 2 114s
checkoutservice-98cf4f4c-477c7 2/2 Running 0 116s
currencyservice-c69c86b7c-j5h7c 2/2 Running 0 114s
emailservice-5db6c8b59f-qh6dl 2/2 Running 0 117s
frontend-8d8958c77-xkkwv 2/2 Running 0 115s
loadgenerator-6bf9fd5bc9-xf4cj 2/2 Running 4 114s
paymentservice-698f684cf9-dfcv7 2/2 Running 0 115s
productcatalogservice-789c77b8dc-vhjzq 2/2 Running 0 115s
recommendationservice-75d7cd8d5c-drpn8 2/2 Running 0 116s
redis-cart-5f59546cdd-p9pzd 2/2 Running 0 113s
shippingservice-7d87945947-45nx5 2/2 Running 0 113s
backyards dashboard
hipstershop
namespace in the namespace selector on Backyards' TOPOLOGY
view. You should see that the app is up and running already:apiVersion: istio.banzaicloud.io/v1beta1
kind: MeshGateway
metadata:
name: hipstershop-ingress
namespace: hipstershop
spec:
maxReplicas: 1
minReplicas: 1
ports:
- name: http
port: 80
protocol: TCP
targetPort: 8080
- name: https
port: 443
protocol: TCP
targetPort: 8443
serviceType: LoadBalancer
type: ingress
labels:
app: hipstershop-ingress
To read more on the MeshGateway resource and on how to setup multiple gateways with Backyards, see the Istio ingress and egress gateways blog post.
GATEWAYS
page on the Backyards dashboard where you should see the hipstershop-ingress
gateway we've just created.CREATE NEW
to create a host and port configuration where you'd like to access the app externally. With Backyards, you can simply generate a subdomain under .banzaicloud.io
and with a single click have a valid Let's Encrypt certificate generated for it. Finally, click on CREATE
:ROUTES
tab and on CREATE NEW
. Provide the host field you selected earlier and setup a route for the frontend
service, then click CREATE
:frontend
service when accessing the specified domain name:frontend
service (frontendv2
) so that we can route traffic for that version as well:
apiVersion: apps/v1
kind: Deployment
metadata:
name: frontendv2
spec:
selector:
matchLabels:
app: frontendv2
template:
metadata:
labels:
app: frontendv2
annotations:
sidecar.istio.io/rewriteAppHTTPProbers: "true"
spec:
containers:
- name: server
image: gcr.io/google-samples/microservices-demo/frontend:v0.1.5
ports:
- containerPort: 8080
readinessProbe:
initialDelaySeconds: 10
httpGet:
path: "/_healthz"
port: 8080
httpHeaders:
- name: "Cookie"
value: "shop_session-id=x-readiness-probe"
livenessProbe:
initialDelaySeconds: 10
httpGet:
path: "/_healthz"
port: 8080
httpHeaders:
- name: "Cookie"
value: "shop_session-id=x-liveness-probe"
env:
- name: PORT
value: "8080"
- name: PRODUCT_CATALOG_SERVICE_ADDR
value: "productcatalogservice:3550"
- name: CURRENCY_SERVICE_ADDR
value: "currencyservice:7000"
- name: CART_SERVICE_ADDR
value: "cartservice:7070"
- name: RECOMMENDATION_SERVICE_ADDR
value: "recommendationservice:8080"
- name: SHIPPING_SERVICE_ADDR
value: "shippingservice:50051"
- name: CHECKOUT_SERVICE_ADDR
value: "checkoutservice:5050"
- name: AD_SERVICE_ADDR
value: "adservice:9555"
- name: ENV_PLATFORM
value: "gcp"
resources:
requests:
cpu: 100m
memory: 64Mi
limits:
cpu: 200m
memory: 128Mi
---
apiVersion: v1
kind: Service
metadata:
name: frontendv2
spec:
type: ClusterIP
selector:
app: frontendv2
ports:
- name: http
port: 80
targetPort: 8080
frontend
service and the other 50% go to the frontendv2
service:frontendv2
service, but all the other pages use the original frontend
service:kubectl delete ns
hipstershop backyards uninstall -a
Want to know more? Get in touch with us, or delve into the details of the latest release. Or just take a look at some of the Istio features that Backyards automates and simplifies for you, and which we've already blogged about.
Get emerging insights on emerging technology straight to your inbox.
Discover why security teams rely on Panoptica's graph-based technology to navigate and prioritize risks across multi-cloud landscapes, enhancing accuracy and resilience in safeguarding diverse ecosystems.
The Shift is Outshift’s exclusive newsletter.
Get the latest news and updates on generative AI, quantum computing, and other groundbreaking innovations shaping the future of technology.