Supercharge your Kubernetes Ingress with Kong Ingress Controller NDC, COPENHAGEN, DENMARK, 2022 @gamussa | #NDCCopenhagen | @thekonginc

Viktor GAMOV Principal Developer Advocate @gamussa | #ndccopenhagen | @thekonginc

Agenda ● Cloud-Native / Kubernetes Native Application Management ● Intro to Kubernetes Ingress ○ Exposing REST services ○ Exposing gRPC ● Advanced Features @gamussa | #NDCCopenhagen | @thekonginc

KUBERNETES NATIVE APPS @gamussa | #NDCCopenhagen | @thekonginc

● A long time ago, in a galaxy far far away… @gamussa | #NDCCopenhagen | @thekonginc

type: LoadBalancer LB Orders Orders Orders @gamussa | #NDCCopenhagen | @thekonginc

LB Bills Orders Analytics Orders Bills Inventory Inventory @gamussa | #NDCCopenhagen | @thekonginc Analytics Orders

LB LB Bills Orders LB Analytics Orders Bills Inventory Inventory @gamussa | #NDCCopenhagen | @thekonginc Analytics Orders

Proxy Bills Orders Analytics Orders Bills Inventory Inventory @gamussa | #NDCCopenhagen | @thekonginc Analytics Orders

KUBERNETES INGRESS @gamussa | #NDCCopenhagen | @thekonginc

Vendor Neutral Spec apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: finance-apis spec: rules: - host: example.com http: paths: - path: /bills backend: service: name: bills THE CLOUD CONNECTIVITY COMPANY @gamussa | #NDCCopenhagen | @thekonginc

kubectl apply -f ingress.yaml API-server Proxy bills orders @gamussa | #NDCCopenhagen | @thekonginc

Who will implement all this? Load-balance Circuit-break Authentication Metrics Rate-limiting Logging Caching Transformations Serverless Custom logic @gamussa | #NDCCopenhagen | @thekonginc

@gamussa | #NDCCopenhagen | @thekonginc

Load-balance Authentication Metrics Circuit-break Logging Caching Serverless Rate-limiting Transformations Custom logic

What is happening when we apply Ingress resource? kubectl apply -f ingress.yaml API-server API Gateway orders @gamussa | #NDCCopenhagen | @thekonginc bills

What is API Gateway? API GATEWAY Authentication Load-balance Logging Circuit-break Metrics Rate-limiting Caching Transformations Serverless Custom logic @gamussa | #NDCCopenhagen | @thekonginc

What’s Kong? Kong Authentication Load-balance Logging Circuit-break Metrics Rate-limiting Caching Transformations Serverless Custom logic @gamussa | #NDCCopenhagen | @thekonginc

con iguration.konghq.com/v1 Custom Resource De inition KongPlugins Authentication Load-balance Logging Circuit-break Metrics Rate-limiting Caching Transformations Serverless Custom logic Additional functions that can be executed as requests are proxied to each Service @gamussa | #NDCCopenhagen | @thekonginc f f THE CLOUD CONNECTIVITY COMPANY 21

De ine Policies apiVersion: configuration.konghq.com/v1 kind: KongPlugin metadata: name: api-auth plugin: key-auth # name of plugin in Kong config: # plugin specific settings key_names: apikey hide_credentials: true f THE CLOUD CONNECTIVITY COMPANY @gamussa | #NDCCopenhagen | @thekonginc

Apply Them apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: finance-apis annotations: konghq.com/plugins: api-auth spec: rules: - host: example.com http: paths: - path: /bills #or add multiple plugins

  • path: /orders THE CLOUD CONNECTIVITY COMPANY @gamussa | #NDCCopenhagen | @thekonginc

Add more policy apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: finance-apis annotations: konghq.com/plugins: api-auth, admins-acl-group, rate-limit-5rpm spec: rules: - host: example.com http: paths: - path: /bills - path: /orders THE CLOUD CONNECTIVITY COMPANY @gamussa | #NDCCopenhagen | @thekonginc

Kong Client THE CLOUD CONNECTIVITY COMPANY Authentication Load-balance Logging Circuit-break Metrics Rate-limiting Caching Transformations Serverless Custom logic @gamussa | #NDCCopenhagen | @thekonginc gRPC JSON Over HTTP Database 25

LET’S SEE SOME CODE Talk is cheap ™! @gamussa | #NDCCopenhagen | @thekonginc

https://www.youtube.com/konginc THE CLOUD CONNECTIVITY COMPANY @gamussa | #NDCCopenhagen | @thekonginc

Join Kong Nation! Links - https://konghq.com/kong-summit - https://youtube.com/konginc - https://konghq.com/community/ @gamussa | #NDCCopenhagen | @thekonginc