Supercharge your Kubernetes Ingress with Kong Ingress Controller

A presentation at NDC Copenhagen in June 2022 in Copenhagen, Denmark by Viktor Gamov

Slide 1

Slide 1

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

Slide 2

Slide 2

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

Slide 3

Slide 3

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

Slide 4

Slide 4

KUBERNETES NATIVE APPS @gamussa | #NDCCopenhagen | @thekonginc

Slide 5

Slide 5

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

Slide 6

Slide 6

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

Slide 7

Slide 7

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

Slide 8

Slide 8

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

Slide 9

Slide 9

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

Slide 10

Slide 10

KUBERNETES INGRESS @gamussa | #NDCCopenhagen | @thekonginc

Slide 11

Slide 11

Slide 12

Slide 12

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

Slide 13

Slide 13

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

Slide 14

Slide 14

Slide 15

Slide 15

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

Slide 16

Slide 16

@gamussa | #NDCCopenhagen | @thekonginc

Slide 17

Slide 17

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

Slide 18

Slide 18

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

Slide 19

Slide 19

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

Slide 20

Slide 20

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

Slide 21

Slide 21

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

Slide 22

Slide 22

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

Slide 23

Slide 23

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

Slide 24

Slide 24

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

Slide 25

Slide 25

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

Slide 26

Slide 26

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

Slide 27

Slide 27

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

Slide 28

Slide 28

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