Explorer Local Logs in Azure API Management Self-hosted Gateway

Published Mar 24 2021 11:16 PM 1,838 Views
Microsoft

Overview
The self-hosted gateway features expand API Management support for multi-cloud environments. You can place the gateway in their Docker, Kubernetes, or any other container orchestration solution which allows customers to optimize traffic flows, security, and compliance. However, you may wonder how to manage related logs and monitoring. Does the admin still need to connect to Azure? In this post, I would like to share how to configure Local logs or Azure API Management self-hosted gateway.

 

As mentioned in Microsoft Document: Configure local metrics and logs for Azure API Management self-hosted gateway | Microsoft Docs , self-hosted gateway output logs to stdout and stderr by default, and also supports multiple protocols. How can we view or get those logs? Let’s take a look!

Solutions

First, please follow the document here: Deploy a self-hosted gateway to Azure Kubernetes Service | Microsoft Docs to deploy a self-hosted gateway to Azure Kubernetes. There are some options to check local logs.

 

Option 1. Self-hosted gateway output logs to stdout and stderr on the host machine by default.

  1. Check stdout and stderr logs in Kubernetes
    1)  kubectl get pods: received pods name
    2)  kubectl logs <pod name>:check stdout and stderr logs
    racchen_2-1616642339594.png

     

  2. In Docker, the stdout and stderr from each container are stored in /var/lib/docker/containers

In Kubernetes, it creates a directory structure to help you find logs based on Pods. You can find the container logs for each Pod running on a node at /var/log/pods/<namespace>_<pod_name>_<pod_id>/<container_name>/
ref: Logging Architecture | Kubernetes

Example.

1.  After creating a self-hosting gateway, follow this doc SSH into Azure Kubernetes Service (AKS) cluster nodes - Azure Kubernetes Service | Microsoft Docs to SSH into the Kubernetes node.

2.  Then you can find related logs in the folder:
racchen_1-1616639333425.png

 

Option 2. Use additional endpoints to realize local logging trough different protocols

Azure API Management self-hosted gateway also supports a number of protocols including localsyslog, rfc5424, and journal. To realize this feature,  you need to mount /dev/log into a container from the host machine. It is because API Management does not log into files, but it logs into Syslog (local or remote), JournalD, or remote UDP endpoint in JSON format.

  • telemetry.logs.local must be set to localsyslog to enable syslog logging
  • To log into localsyslog - mount /dev/log from container host into the container.
  • To log into remote Syslog - specify UDP endpoint instead.
  • To log into journal - mount /var/run/systemd/journal/socket. To make localsyslog/journal work, you must mount host sockets into API Management ‘s container.
  • To log into fluentd - specify remote UDP endpoint.

Sample yaml file: 
Below is a complete sample yaml file for localsyslog

 

# NOTE: Before deploying to a production environment, please review the documentation -> https://aka.ms/self-hosted-gateway-production
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: localgateway-env
data:
  config.service.endpoint: "https://<APIMname>.management.azure-api.net/subscriptions/<subscriptionID>/resourceGroups/APIM/providers/Microsoft.ApiManagement/service/<APIMname>?api-version=2019-12-01"
  telemetry.logs.std: "text"
  telemetry.logs.local: "localsyslog"
  telemetry.logs.local.localsyslog.endpoint: "/dev/log"
  telemetry.logs.local.localsyslog.facility: "7"
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: localgateway
spec:
  replicas: 1
  selector:
    matchLabels:
      app: localgateway
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 0
      maxSurge: 25%
  template:
    metadata:
      labels:
        app: localgateway
    spec:
      terminationGracePeriodSeconds: 60
      containers:
      - name: localgateway
        image: mcr.microsoft.com/azure-api-management/gateway:latest
        volumeMounts:
        - name: logs
          mountPath: /dev/log
        ports:
        - name: http
          containerPort: 8080
        - name: https
          containerPort: 8081
        readinessProbe:
          httpGet:
            path: /internal-status-0123456789abcdef
            port: http
            scheme: HTTP
          initialDelaySeconds: 0
          periodSeconds: 5
          failureThreshold: 3
          successThreshold: 1
        env:
        - name: config.service.auth
          valueFrom:
            secretKeyRef:
              name: localgateway-token
              key: value
        envFrom:
        - configMapRef:
            name: localgateway-env
      volumes:
        - name: logs
          hostPath:
            path: /dev/log
            type: Socket
---
apiVersion: v1
kind: Service
metadata:
  name: localgateway
spec:
  type: LoadBalancer
  externalTrafficPolicy: Local
  ports:
  - name: http
    port: 80
    targetPort: 8080
  - name: https
    port: 443
    targetPort: 8081
  selector:
    app: localgateway

 

Lab

  • In this lab, I deployed the yaml file above in my AKS service.
  • After deployment, use kubectl get deployment to confirm the deployment is ready.
    racchen_0-1616645248918.png
  • Check the IP address of this service by the command kubectl get service.
  • Send a few requests from the Postman.
    racchen_0-1616645329341.png
  • Logs can be found under /var/log/syslog.
    racchen_1-1616645400085.png

     

 
%3CLINGO-SUB%20id%3D%22lingo-sub-2234173%22%20slang%3D%22en-US%22%3EExplorer%20Local%20Logs%20in%20Azure%20API%20Management%20Self-hosted%20Gateway%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2234173%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSTRONG%3E%3CFONT%20size%3D%225%22%3EOverview%3C%2FFONT%3E%20%3CBR%20%2F%3E%3C%2FSTRONG%3EThe%20self-hosted%20gateway%20features%20expand%20API%20Management%20support%20for%20multi-cloud%20environments.%20You%20can%20place%20the%20gateway%20in%20their%20Docker%2C%20Kubernetes%2C%20or%20any%20other%20container%20orchestration%20solution%20which%20allows%20customers%20to%20optimize%20traffic%20flows%2C%20security%2C%20and%20compliance.%20However%2C%20you%20may%20wonder%20how%20to%20manage%20related%20logs%20and%20monitoring.%20Does%20the%20admin%20still%20need%20to%20connect%20to%20Azure%3F%20In%20this%20post%2C%20I%20would%20like%20to%20share%20how%20to%20configure%20Local%20logs%20or%20Azure%20API%20Management%20self-hosted%20gateway.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAs%20mentioned%20in%20Microsoft%20Document%3A%20%3CA%20href%3D%22https%3A%2F%2Fnam06.safelinks.protection.outlook.com%2F%3Furl%3Dhttps%253A%252F%252Fdocs.microsoft.com%252Fen-us%252Fazure%252Fapi-management%252Fhow-to-configure-local-metrics-logs%2523logs%26amp%3Bdata%3D04%257C01%257CRachel.Chen%2540microsoft.com%257C2f7420499604449ed49008d8ef30165f%257C72f988bf86f141af91ab2d7cd011db47%257C1%257C0%257C637522337104235589%257CUnknown%257CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%253D%257C1000%26amp%3Bsdata%3De3TPnlyxz%252FEXgnxo55hLoxJSDiv2xSZQIx1BxhYft7E%253D%26amp%3Breserved%3D0%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3EConfigure%20local%20metrics%20and%20logs%20for%20Azure%20API%20Management%20self-hosted%20gateway%20%7C%20Microsoft%20Docs%3C%2FA%3E%20%2C%20self-hosted%20gateway%20output%20logs%20to%20stdout%20and%20stderr%20by%20default%2C%20and%20also%20supports%20multiple%20protocols.%20How%20can%20we%20view%20or%20get%20those%20logs%3F%20Let%E2%80%99s%20take%20a%20look!%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%225%22%3E%3CSTRONG%3ESolutions%3CBR%20%2F%3E%3C%2FSTRONG%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3EFirst%2C%20please%20follow%20the%20document%20here%3A%20%3CA%20href%3D%22https%3A%2F%2Fnam06.safelinks.protection.outlook.com%2F%3Furl%3Dhttps%253A%252F%252Fdocs.microsoft.com%252Fen-us%252Fazure%252Fapi-management%252Fhow-to-deploy-self-hosted-gateway-azure-kubernetes-service%26amp%3Bdata%3D04%257C01%257CRachel.Chen%2540microsoft.com%257C2f7420499604449ed49008d8ef30165f%257C72f988bf86f141af91ab2d7cd011db47%257C1%257C0%257C637522337104245541%257CUnknown%257CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%253D%257C1000%26amp%3Bsdata%3D%252FiOztSYmip5CLi0RkGqOmKNiDiqcdO5F%252Bciy5oPDXuc%253D%26amp%3Breserved%3D0%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3EDeploy%20a%20self-hosted%20gateway%20to%20Azure%20Kubernetes%20Service%20%7C%20Microsoft%20Docs%3C%2FA%3E%20to%20deploy%20a%20self-hosted%20gateway%20to%20Azure%20Kubernetes.%20There%20are%20some%20options%20to%20check%20local%20logs.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CU%3E%3CSTRONG%3EOption%201.%20Self-hosted%20gateway%20output%20logs%20to%20stdout%20and%20stderr%20on%20the%20host%20machine%20by%20default.%3C%2FSTRONG%3E%3CBR%20%2F%3E%3C%2FU%3E%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3ECheck%20stdout%20and%20stderr%20logs%20in%20Kubernetes%3CBR%20%2F%3E1)%26nbsp%3B%20kubectl%20get%20pods%3A%20received%20pods%20name%20%3CBR%20%2F%3E2)%26nbsp%3B%20kubectl%20logs%20%3CPOD%20name%3D%22%22%3E%3Acheck%20stdout%20and%20stderr%20logs%20%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22racchen_2-1616642339594.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F266893i49307D414EC01C04%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22racchen_2-1616642339594.png%22%20alt%3D%22racchen_2-1616642339594.png%22%20%2F%3E%3C%2FSPAN%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3C%2FPOD%3E%3C%2FLI%3E%0A%3CLI%3EIn%20Docker%2C%20the%20stdout%20and%20stderr%20from%20each%20container%20are%20stored%20in%20%2Fvar%2Flib%2Fdocker%2Fcontainers%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%20class%3D%22lia-indent-padding-left-30px%22%3EIn%20Kubernetes%2C%20it%20creates%20a%20directory%20structure%20to%20help%20you%20find%20logs%20based%20on%20Pods.%20You%20can%20find%20the%20container%20logs%20for%20each%20Pod%20running%20on%20a%20node%20at%20%2Fvar%2Flog%2Fpods%2F%3CNAMESPACE%3E_%3CPOD_NAME%3E_%3CPOD_ID%3E%2F%3CCONTAINER_NAME%3E%2F%3CBR%20%2F%3Eref%3A%20%3CA%20href%3D%22https%3A%2F%2Fnam06.safelinks.protection.outlook.com%2F%3Furl%3Dhttps%253A%252F%252Fkubernetes.io%252Fdocs%252Fconcepts%252Fcluster-administration%252Flogging%252F%26amp%3Bdata%3D04%257C01%257CRachel.Chen%2540microsoft.com%257C2f7420499604449ed49008d8ef30165f%257C72f988bf86f141af91ab2d7cd011db47%257C1%257C0%257C637522337104245541%257CUnknown%257CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%253D%257C1000%26amp%3Bsdata%3DSgFsqEK34oaAV9WdLXmw1jxFcBmzJF9RSnIMDmmH%252BfU%253D%26amp%3Breserved%3D0%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3ELogging%20Architecture%20%7C%20Kubernetes%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FCONTAINER_NAME%3E%3C%2FPOD_ID%3E%3C%2FPOD_NAME%3E%3C%2FNAMESPACE%3E%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-30px%22%3E%3CEM%3EExample%3C%2FEM%3E.%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-30px%22%3E1.%26nbsp%3B%20After%20creating%20a%20self-hosting%20gateway%2C%20follow%20this%20doc%20%3CA%20href%3D%22https%3A%2F%2Fnam06.safelinks.protection.outlook.com%2F%3Furl%3Dhttps%253A%252F%252Fdocs.microsoft.com%252Fen-us%252Fazure%252Faks%252Fssh%2523create-the-ssh-connection%26amp%3Bdata%3D04%257C01%257CRachel.Chen%2540microsoft.com%257C2f7420499604449ed49008d8ef30165f%257C72f988bf86f141af91ab2d7cd011db47%257C1%257C0%257C637522337104255486%257CUnknown%257CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%253D%257C1000%26amp%3Bsdata%3DcuYarP4PzS6IkIl4MDjio0POB1lXSVL6HZwWgQSvRLE%253D%26amp%3Breserved%3D0%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3ESSH%20into%20Azure%20Kubernetes%20Service%20(AKS)%20cluster%20nodes%20-%20Azure%20Kubernetes%20Service%20%7C%20Microsoft%20Docs%3C%2FA%3E%20to%20SSH%20into%20the%20Kubernetes%20node.%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-30px%22%3E2.%26nbsp%3B%20Then%20you%20can%20find%20related%20logs%20in%20the%20folder%3A%20%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22racchen_1-1616639333425.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F266883iC5E9A9A5ABC92871%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22racchen_1-1616639333425.png%22%20alt%3D%22racchen_1-1616639333425.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CU%3EOption%202.%20Use%20additional%20endpoints%20to%20realize%20local%20logging%20trough%20different%20protocols%3C%2FU%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EAzure%20API%20Management%20self-hosted%20gateway%20also%20supports%20a%20number%20of%20protocols%20including%26nbsp%3Blocalsyslog%2C%26nbsp%3Brfc5424%2C%20and%26nbsp%3Bjournal.%20To%20realize%20this%20feature%2C%20%26nbsp%3Byou%20need%20to%20mount%20%2Fdev%2Flog%20into%20a%20container%20from%20the%20host%20machine.%20It%20is%20because%20API%20Management%20does%20not%20log%20into%20files%2C%20but%20it%20logs%20into%20Syslog%20(local%20or%20remote)%2C%20JournalD%2C%20or%20remote%20UDP%20endpoint%20in%20JSON%20format.%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3Etelemetry.logs.local%20must%20be%20set%20to%20localsyslog%20to%20enable%20syslog%20logging%3C%2FLI%3E%0A%3CLI%3ETo%20log%20into%20localsyslog%20-%20mount%20%2Fdev%2Flog%20from%20container%20host%20into%20the%20container.%3C%2FLI%3E%0A%3CLI%3ETo%20log%20into%20remote%20Syslog%20-%20specify%20UDP%20endpoint%20instead.%3C%2FLI%3E%0A%3CLI%3ETo%20log%20into%20journal%20-%20mount%20%2Fvar%2Frun%2Fsystemd%2Fjournal%2Fsocket.%20To%20make%20localsyslog%2Fjournal%20work%2C%20you%20must%20mount%20host%20sockets%20into%20API%20Management%20%E2%80%98s%20container.%3C%2FLI%3E%0A%3CLI%3ETo%20log%20into%20fluentd%20-%20specify%20remote%20UDP%20endpoint.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%3CEM%3ESample%20yaml%20file%3A%26nbsp%3B%3C%2FEM%3E%3CBR%20%2F%3EBelow%20is%20a%20complete%20sample%20yaml%20file%20for%20localsyslog%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-yaml%22%3E%3CCODE%3E%23%20NOTE%3A%20Before%20deploying%20to%20a%20production%20environment%2C%20please%20review%20the%20documentation%20-%26gt%3B%20https%3A%2F%2Faka.ms%2Fself-hosted-gateway-production%0A---%0AapiVersion%3A%20v1%0Akind%3A%20ConfigMap%0Ametadata%3A%0A%20%20name%3A%20localgateway-env%0Adata%3A%0A%20%20config.service.endpoint%3A%20%22https%3A%2F%2F%3CAPIMNAME%3E.management.azure-api.net%2Fsubscriptions%2F%3CSUBSCRIPTIONID%3E%2FresourceGroups%2FAPIM%2Fproviders%2FMicrosoft.ApiManagement%2Fservice%2F%3CAPIMNAME%3E%3Fapi-version%3D2019-12-01%22%0A%20%20telemetry.logs.std%3A%20%22text%22%0A%20%20telemetry.logs.local%3A%20%22localsyslog%22%0A%20%20telemetry.logs.local.localsyslog.endpoint%3A%20%22%2Fdev%2Flog%22%0A%20%20telemetry.logs.local.localsyslog.facility%3A%20%227%22%0A---%0AapiVersion%3A%20apps%2Fv1%0Akind%3A%20Deployment%0Ametadata%3A%0A%20%20name%3A%20localgateway%0Aspec%3A%0A%20%20replicas%3A%201%0A%20%20selector%3A%0A%20%20%20%20matchLabels%3A%0A%20%20%20%20%20%20app%3A%20localgateway%0A%20%20strategy%3A%0A%20%20%20%20type%3A%20RollingUpdate%0A%20%20%20%20rollingUpdate%3A%0A%20%20%20%20%20%20maxUnavailable%3A%200%0A%20%20%20%20%20%20maxSurge%3A%2025%25%0A%20%20template%3A%0A%20%20%20%20metadata%3A%0A%20%20%20%20%20%20labels%3A%0A%20%20%20%20%20%20%20%20app%3A%20localgateway%0A%20%20%20%20spec%3A%0A%20%20%20%20%20%20terminationGracePeriodSeconds%3A%2060%0A%20%20%20%20%20%20containers%3A%0A%20%20%20%20%20%20-%20name%3A%20localgateway%0A%20%20%20%20%20%20%20%20image%3A%20mcr.microsoft.com%2Fazure-api-management%2Fgateway%3Alatest%0A%20%20%20%20%20%20%20%20volumeMounts%3A%0A%20%20%20%20%20%20%20%20-%20name%3A%20logs%0A%20%20%20%20%20%20%20%20%20%20mountPath%3A%20%2Fdev%2Flog%0A%20%20%20%20%20%20%20%20ports%3A%0A%20%20%20%20%20%20%20%20-%20name%3A%20http%0A%20%20%20%20%20%20%20%20%20%20containerPort%3A%208080%0A%20%20%20%20%20%20%20%20-%20name%3A%20https%0A%20%20%20%20%20%20%20%20%20%20containerPort%3A%208081%0A%20%20%20%20%20%20%20%20readinessProbe%3A%0A%20%20%20%20%20%20%20%20%20%20httpGet%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20path%3A%20%2Finternal-status-0123456789abcdef%0A%20%20%20%20%20%20%20%20%20%20%20%20port%3A%20http%0A%20%20%20%20%20%20%20%20%20%20%20%20scheme%3A%20HTTP%0A%20%20%20%20%20%20%20%20%20%20initialDelaySeconds%3A%200%0A%20%20%20%20%20%20%20%20%20%20periodSeconds%3A%205%0A%20%20%20%20%20%20%20%20%20%20failureThreshold%3A%203%0A%20%20%20%20%20%20%20%20%20%20successThreshold%3A%201%0A%20%20%20%20%20%20%20%20env%3A%0A%20%20%20%20%20%20%20%20-%20name%3A%20config.service.auth%0A%20%20%20%20%20%20%20%20%20%20valueFrom%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20secretKeyRef%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20name%3A%20localgateway-token%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20key%3A%20value%0A%20%20%20%20%20%20%20%20envFrom%3A%0A%20%20%20%20%20%20%20%20-%20configMapRef%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20name%3A%20localgateway-env%0A%20%20%20%20%20%20volumes%3A%0A%20%20%20%20%20%20%20%20-%20name%3A%20logs%0A%20%20%20%20%20%20%20%20%20%20hostPath%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20path%3A%20%2Fdev%2Flog%0A%20%20%20%20%20%20%20%20%20%20%20%20type%3A%20Socket%0A---%0AapiVersion%3A%20v1%0Akind%3A%20Service%0Ametadata%3A%0A%20%20name%3A%20localgateway%0Aspec%3A%0A%20%20type%3A%20LoadBalancer%0A%20%20externalTrafficPolicy%3A%20Local%0A%20%20ports%3A%0A%20%20-%20name%3A%20http%0A%20%20%20%20port%3A%2080%0A%20%20%20%20targetPort%3A%208080%0A%20%20-%20name%3A%20https%0A%20%20%20%20port%3A%20443%0A%20%20%20%20targetPort%3A%208081%0A%20%20selector%3A%0A%20%20%20%20app%3A%20localgateway%3C%2FAPIMNAME%3E%3C%2FSUBSCRIPTIONID%3E%3C%2FAPIMNAME%3E%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CEM%3ELab%3C%2FEM%3E%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EIn%20this%20lab%2C%20I%20deployed%20the%20yaml%20file%20above%20in%20my%20AKS%20service.%3C%2FLI%3E%0A%3CLI%3EAfter%20deployment%2C%20use%20kubectl%20get%20deployment%20to%20confirm%20the%20deployment%20is%20ready.%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22racchen_0-1616645248918.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F266898iFA9B56E79F72392D%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22racchen_0-1616645248918.png%22%20alt%3D%22racchen_0-1616645248918.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CUL%3E%0A%3CLI%3ECheck%20the%20IP%20address%20of%20this%20service%20by%20the%20command%20kubectl%20get%20service.%3C%2FLI%3E%0A%3CLI%3ESend%20a%20few%20requests%20from%20the%20Postman.%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22racchen_0-1616645329341.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F266901i8782FA8CBDB3C5D7%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22racchen_0-1616645329341.png%22%20alt%3D%22racchen_0-1616645329341.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CUL%3E%0A%3CLI%3ELogs%20can%20be%20found%20under%20%2Fvar%2Flog%2Fsyslog.%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22racchen_1-1616645400085.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F266902i5F1C69F08B18BC95%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22racchen_1-1616645400085.png%22%20alt%3D%22racchen_1-1616645400085.png%22%20%2F%3E%3C%2FSPAN%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CDIV%20class%3D%22ms-editor-squiggler%22%20style%3D%22color%3A%20initial%3B%20font%3A%20initial%3B%20font-feature-settings%3A%20initial%3B%20font-kerning%3A%20initial%3B%20font-optical-sizing%3A%20initial%3B%20font-variation-settings%3A%20initial%3B%20forced-color-adjust%3A%20initial%3B%20text-orientation%3A%20initial%3B%20text-rendering%3A%20initial%3B%20-webkit-font-smoothing%3A%20initial%3B%20-webkit-locale%3A%20initial%3B%20-webkit-text-orientation%3A%20initial%3B%20-webkit-writing-mode%3A%20initial%3B%20writing-mode%3A%20initial%3B%20zoom%3A%20initial%3B%20place-content%3A%20initial%3B%20place-items%3A%20initial%3B%20place-self%3A%20initial%3B%20alignment-baseline%3A%20initial%3B%20animation%3A%20initial%3B%20appearance%3A%20initial%3B%20aspect-ratio%3A%20initial%3B%20backdrop-filter%3A%20initial%3B%20backface-visibility%3A%20initial%3B%20background%3A%20initial%3B%20background-blend-mode%3A%20initial%3B%20baseline-shift%3A%20initial%3B%20block-size%3A%20initial%3B%20border-block%3A%20initial%3B%20border%3A%20initial%3B%20border-radius%3A%20initial%3B%20border-collapse%3A%20initial%3B%20border-end-end-radius%3A%20initial%3B%20border-end-start-radius%3A%20initial%3B%20border-inline%3A%20initial%3B%20border-start-end-radius%3A%20initial%3B%20border-start-start-radius%3A%20initial%3B%20inset%3A%20initial%3B%20box-shadow%3A%20initial%3B%20box-sizing%3A%20initial%3B%20break-after%3A%20initial%3B%20break-before%3A%20initial%3B%20break-inside%3A%20initial%3B%20buffered-rendering%3A%20initial%3B%20caption-side%3A%20initial%3B%20caret-color%3A%20initial%3B%20clear%3A%20initial%3B%20clip%3A%20initial%3B%20clip-path%3A%20initial%3B%20clip-rule%3A%20initial%3B%20color-interpolation%3A%20initial%3B%20color-interpolation-filters%3A%20initial%3B%20color-rendering%3A%20initial%3B%20color-scheme%3A%20initial%3B%20columns%3A%20initial%3B%20column-fill%3A%20initial%3B%20gap%3A%20initial%3B%20column-rule%3A%20initial%3B%20column-span%3A%20initial%3B%20contain%3A%20initial%3B%20contain-intrinsic-size%3A%20initial%3B%20content%3A%20initial%3B%20content-visibility%3A%20initial%3B%20counter-increment%3A%20initial%3B%20counter-reset%3A%20initial%3B%20counter-set%3A%20initial%3B%20cursor%3A%20initial%3B%20cx%3A%20initial%3B%20cy%3A%20initial%3B%20d%3A%20initial%3B%20display%3A%20block%3B%20dominant-baseline%3A%20initial%3B%20empty-cells%3A%20initial%3B%20fill%3A%20initial%3B%20fill-opacity%3A%20initial%3B%20fill-rule%3A%20initial%3B%20filter%3A%20initial%3B%20flex%3A%20initial%3B%20flex-flow%3A%20initial%3B%20float%3A%20initial%3B%20flood-color%3A%20initial%3B%20flood-opacity%3A%20initial%3B%20grid%3A%20initial%3B%20grid-area%3A%20initial%3B%20height%3A%200px%3B%20hyphens%3A%20initial%3B%20image-orientation%3A%20initial%3B%20image-rendering%3A%20initial%3B%20inline-size%3A%20initial%3B%20inset-block%3A%20initial%3B%20inset-inline%3A%20initial%3B%20isolation%3A%20initial%3B%20letter-spacing%3A%20initial%3B%20lighting-color%3A%20initial%3B%20line-break%3A%20initial%3B%20list-style%3A%20initial%3B%20margin-block%3A%20initial%3B%20margin%3A%20initial%3B%20margin-inline%3A%20initial%3B%20marker%3A%20initial%3B%20mask%3A%20initial%3B%20mask-type%3A%20initial%3B%20max-block-size%3A%20initial%3B%20max-height%3A%20initial%3B%20max-inline-size%3A%20initial%3B%20max-width%3A%20initial%3B%20min-block-size%3A%20initial%3B%20min-height%3A%20initial%3B%20min-inline-size%3A%20initial%3B%20min-width%3A%20initial%3B%20mix-blend-mode%3A%20initial%3B%20object-fit%3A%20initial%3B%20object-position%3A%20initial%3B%20offset%3A%20initial%3B%20opacity%3A%20initial%3B%20order%3A%20initial%3B%20origin-trial-test-property%3A%20initial%3B%20orphans%3A%20initial%3B%20outline%3A%20initial%3B%20outline-offset%3A%20initial%3B%20overflow-anchor%3A%20initial%3B%20overflow-wrap%3A%20initial%3B%20overflow%3A%20initial%3B%20overscroll-behavior-block%3A%20initial%3B%20overscroll-behavior-inline%3A%20initial%3B%20overscroll-behavior%3A%20initial%3B%20padding-block%3A%20initial%3B%20padding%3A%20initial%3B%20padding-inline%3A%20initial%3B%20page%3A%20initial%3B%20page-orientation%3A%20initial%3B%20paint-order%3A%20initial%3B%20perspective%3A%20initial%3B%20perspective-origin%3A%20initial%3B%20pointer-events%3A%20initial%3B%20position%3A%20initial%3B%20quotes%3A%20initial%3B%20r%3A%20initial%3B%20resize%3A%20initial%3B%20ruby-position%3A%20initial%3B%20rx%3A%20initial%3B%20ry%3A%20initial%3B%20scroll-behavior%3A%20initial%3B%20scroll-margin-block%3A%20initial%3B%20scroll-margin%3A%20initial%3B%20scroll-margin-inline%3A%20initial%3B%20scroll-padding-block%3A%20initial%3B%20scroll-padding%3A%20initial%3B%20scroll-padding-inline%3A%20initial%3B%20scroll-snap-align%3A%20initial%3B%20scroll-snap-stop%3A%20initial%3B%20scroll-snap-type%3A%20initial%3B%20shape-image-threshold%3A%20initial%3B%20shape-margin%3A%20initial%3B%20shape-outside%3A%20initial%3B%20shape-rendering%3A%20initial%3B%20size%3A%20initial%3B%20speak%3A%20initial%3B%20stop-color%3A%20initial%3B%20stop-opacity%3A%20initial%3B%20stroke%3A%20initial%3B%20stroke-dasharray%3A%20initial%3B%20stroke-dashoffset%3A%20initial%3B%20stroke-linecap%3A%20initial%3B%20stroke-linejoin%3A%20initial%3B%20stroke-miterlimit%3A%20initial%3B%20stroke-opacity%3A%20initial%3B%20stroke-width%3A%20initial%3B%20tab-size%3A%20initial%3B%20table-layout%3A%20initial%3B%20text-align%3A%20initial%3B%20text-align-last%3A%20initial%3B%20text-anchor%3A%20initial%3B%20text-combine-upright%3A%20initial%3B%20text-decoration%3A%20initial%3B%20text-decoration-skip-ink%3A%20initial%3B%20text-indent%3A%20initial%3B%20text-overflow%3A%20initial%3B%20text-shadow%3A%20initial%3B%20text-size-adjust%3A%20initial%3B%20text-transform%3A%20initial%3B%20text-underline-offset%3A%20initial%3B%20text-underline-position%3A%20initial%3B%20touch-action%3A%20initial%3B%20transform%3A%20initial%3B%20transform-box%3A%20initial%3B%20transform-origin%3A%20initial%3B%20transform-style%3A%20initial%3B%20transition%3A%20initial%3B%20user-select%3A%20initial%3B%20vector-effect%3A%20initial%3B%20vertical-align%3A%20initial%3B%20visibility%3A%20initial%3B%20-webkit-app-region%3A%20initial%3B%20border-spacing%3A%20initial%3B%20-webkit-border-image%3A%20initial%3B%20-webkit-box-align%3A%20initial%3B%20-webkit-box-decoration-break%3A%20initial%3B%20-webkit-box-direction%3A%20initial%3B%20-webkit-box-flex%3A%20initial%3B%20-webkit-box-ordinal-group%3A%20initial%3B%20-webkit-box-orient%3A%20initial%3B%20-webkit-box-pack%3A%20initial%3B%20-webkit-box-reflect%3A%20initial%3B%20-webkit-highlight%3A%20initial%3B%20-webkit-hyphenate-character%3A%20initial%3B%20-webkit-line-break%3A%20initial%3B%20-webkit-line-clamp%3A%20initial%3B%20-webkit-mask-box-image%3A%20initial%3B%20-webkit-mask%3A%20initial%3B%20-webkit-mask-composite%3A%20initial%3B%20-webkit-perspective-origin-x%3A%20initial%3B%20-webkit-perspective-origin-y%3A%20initial%3B%20-webkit-print-color-adjust%3A%20initial%3B%20-webkit-rtl-ordering%3A%20initial%3B%20-webkit-ruby-position%3A%20initial%3B%20-webkit-tap-highlight-color%3A%20initial%3B%20-webkit-text-combine%3A%20initial%3B%20-webkit-text-decorations-in-effect%3A%20initial%3B%20-webkit-text-emphasis%3A%20initial%3B%20-webkit-text-emphasis-position%3A%20initial%3B%20-webkit-text-fill-color%3A%20initial%3B%20-webkit-text-security%3A%20initial%3B%20-webkit-text-stroke%3A%20initial%3B%20-webkit-transform-origin-x%3A%20initial%3B%20-webkit-transform-origin-y%3A%20initial%3B%20-webkit-transform-origin-z%3A%20initial%3B%20-webkit-user-drag%3A%20initial%3B%20-webkit-user-modify%3A%20initial%3B%20white-space%3A%20initial%3B%20widows%3A%20initial%3B%20width%3A%20initial%3B%20will-change%3A%20initial%3B%20word-break%3A%20initial%3B%20word-spacing%3A%20initial%3B%20x%3A%20initial%3B%20y%3A%20initial%3B%20z-index%3A%20initial%3B%22%3E%26nbsp%3B%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-2234173%22%20slang%3D%22en-US%22%3E%3CP%3EThe%20self-hosted%20gateway%20features%20expand%20Azure%20API%20Management%20support%20for%20multi-cloud%20environments.%20You%20can%20place%20the%20gateway%20in%20their%20Docker%2C%20Kubernetes%2C%20or%20any%20other%20container%20orchestration%20solution%20which%20allows%20customers%20to%20optimize%20traffic%20flows%2C%20security%2C%20and%20compliance.%20However%2C%20you%20may%20wonder%20how%20to%20manage%20related%20logs%20and%20monitoring.%20Does%20the%20admin%20still%20need%20to%20connect%20to%20Azure%3F%20In%20this%20post%2C%20I%20would%20like%20to%20share%20how%20to%20configure%20Local%20logs%20or%20Azure%20API%20Management%20self-hosted%20gateway.%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2234173%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20API%20management%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Co-Authors
Version history
Last update:
‎Mar 24 2021 11:42 PM
Updated by: