gRPC health check from cart to payment service
gRPC health check from cart to payment service.
Configuration
apiVersion: kuma.io/v1alpha1
kind: MeshHealthCheck
metadata:
name: web-to-backend-check
namespace: kuma-demo
labels:
kuma.io/mesh: default
spec:
targetRef:
kind: Dataplane
labels:
app: web
to:
- targetRef:
kind: MeshService
name: backend_kuma-demo_svc_3001
default:
interval: 15s
timeout: 5s
unhealthyThreshold: 3
healthyThreshold: 2
grpc:
serviceName: grpc.health.v1.CustomHealth
apiVersion: kuma.io/v1alpha1
kind: MeshHealthCheck
metadata:
name: web-to-backend-check
namespace: kuma-demo
labels:
kuma.io/mesh: default
spec:
targetRef:
kind: Dataplane
labels:
app: web
to:
- targetRef:
kind: MeshService
name: backend
namespace: kuma-demo
sectionName: http
default:
interval: 15s
timeout: 5s
unhealthyThreshold: 3
healthyThreshold: 2
grpc:
serviceName: grpc.health.v1.CustomHealth
type: MeshHealthCheck
name: web-to-backend-check
mesh: default
spec:
targetRef:
kind: Dataplane
labels:
app: web
to:
- targetRef:
kind: MeshService
name: backend
default:
interval: 15s
timeout: 5s
unhealthyThreshold: 3
healthyThreshold: 2
grpc:
serviceName: grpc.health.v1.CustomHealth
type: MeshHealthCheck
name: web-to-backend-check
mesh: default
spec:
targetRef:
kind: Dataplane
labels:
app: web
to:
- targetRef:
kind: MeshService
name: backend
sectionName: http
default:
interval: 15s
timeout: 5s
unhealthyThreshold: 3
healthyThreshold: 2
grpc:
serviceName: grpc.health.v1.CustomHealth
Please adjust konnect_mesh_control_plane.my_meshcontrolplane.id and konnect_mesh.my_mesh.name according to your current configuration.
resource "konnect_mesh_health_check" "web_to_backend_check" {
provider = konnect-beta
type = "MeshHealthCheck"
name = "web-to-backend-check"
spec = {
target_ref = {
kind = "Dataplane"
labels = {
app = "web"
}
}
to = [
{
target_ref = {
kind = "MeshService"
name = "backend"
section_name = "http"
}
default = {
interval = "15s"
timeout = "5s"
unhealthy_threshold = "3"
healthy_threshold = "2"
grpc = {
service_name = "grpc.health.v1.CustomHealth"
}
}
}
]
}
labels = {
"kuma.io/mesh" = konnect_mesh.my_mesh.name
}
cp_id = konnect_mesh_control_plane.my_meshcontrolplane.id
mesh = konnect_mesh.my_mesh.name
}