k8s/gateway/healthcheckpolicy.yaml
apiVersion: networking.gke.io/v1
kind: HealthCheckPolicy
metadata:
name: notiflex-healthcheck
namespace: notiflex
spec:
default:
checkIntervalSec: 15
timeoutSec: 5
healthyThreshold: 1
unhealthyThreshold: 2
config:
type: HTTP
httpHealthCheck:
port: 8080
requestPath: /health
targetRef:
group: ""
kind: Service
name: notiflex-api
$ kubectl --context gke-sysnet4admin_book_gitaiops apply -f k8s/gateway/healthcheckpolicy.yaml
healthcheckpolicy.networking.gke.io/notiflex-healthcheck created