example of ingress resources
image credit: https://www.nginx-cn.net/

example of ingress resources

An Ingress resource in Kubernetes is a collection of rules that allow inbound connections to reach the Kubernetes cluster services. It acts as a reverse proxy and routing rules for external traffic to access the services inside the cluster. Here is an example of an Ingress resource:


Es wurde kein Alt-Text für dieses Bild angegeben.
Ingress resource file

This Ingress resource routes traffic for the host myapp.example.com to the services my-api-service and my-web-service based on the path. The "/api" path routes to my-api-service and the "/" path routes to my-web-service. It also uses annotation to rewrite the target path.

It is worth noting that Ingress resources are not natively supported by all Kubernetes distributions and requires an Ingress controller to be installed in the cluster. Some of the most popular ingress controllers are Nginx, Istio, Traefik.

In this example, I've used Nginx Ingress controller, but you can use any ingress controller you like and the configuration may vary.

要查看或添加评论,请登录

Ralf T. Μεντ?的更多文章

  • Kubernetes 1.27 Registry change

    Kubernetes 1.27 Registry change

    Hello folks, here is the crazy swabian #Kubernetes guy and I want to give you in my series some tipps about Kubernetes.…

    1 条评论
  • Pets vs Cattle - an Intro

    Pets vs Cattle - an Intro

    The terms "pets" and "cattle" are used metaphorically to differentiate between different approaches to managing and…

    1 条评论
  • Optimize Kubernetes resource configurations for cost and performance

    Optimize Kubernetes resource configurations for cost and performance

    Hello folks, here is the crazy swabian #Kubernetes guy and I want to give you in my series some tipps about Kubernetes.…

  • Overview of StatefulSet in Kubernetes

    Overview of StatefulSet in Kubernetes

    In Kubernetes, a StatefulSet is a type of controller that manages the deployment and scaling of a set of stateful pods.…

  • What are the main components of a Kubernetes cluster?

    What are the main components of a Kubernetes cluster?

    A Kubernetes cluster typically consists of the following main components: Control Plane: The most important node of the…

  • Intro Kubernetes Network Policy

    Intro Kubernetes Network Policy

    In Kubernetes, network policies are implemented using a custom resource definition (CRD) and allow you to define…

  • how can I change CNI in Kubernetes ?

    how can I change CNI in Kubernetes ?

    To change the CNI (Container Network Interface) in a Kubernetes cluster, you will need to follow these steps in detail:…

  • Kubernetes Deployments in general

    Kubernetes Deployments in general

    A Deployment in Kubernetes is a higher-level abstraction that manages ReplicaSets and pods. It provides declarative…

  • What is ReplicationSet in Kubernetes?

    What is ReplicationSet in Kubernetes?

    A ReplicaSet in Kubernetes is a controller that ensures a specified number of replicas (or copies) of a pod are running…

  • Deployment strategies in Kubernetes

    Deployment strategies in Kubernetes

    There are several ways to deploy applications in Kubernetes, some common strategies include: Rolling Deployment: This…

社区洞察

其他会员也浏览了