---
# System prepended metadata

title: gateway api 配套之 HealthCheckPolicy create失敗

---

# gateway api 配套之 HealthCheckPolicy create失敗

根據[官方文件](https://cloud.google.com/kubernetes-engine/docs/how-to/configure-gateway-resources#configure_health_check)改寫如下yaml：
```
apiVersion: networking.gke.io/v1
kind: HealthCheckPolicy
metadata:
  name: kibana-healthcheck
  namespace: eck-elk-stack
spec:
  default:
    checkIntervalSec: 10
    timeoutSec: 10
    healthyThreshold: 4
    unhealthyThreshold: 6
    logConfig:
      enabled: true
    config:
      type: HTTPS
      healthCheck:
        httpHealthCheck:
          portSpecification: USE_SERVING_PORT
          port: 5601
          # portName: PORT_NAME
          host: dev.ghtinc.com
          requestPath: /login
          response: 
          proxyHeader: NONE
    requestPath: /login
    port: 5601
  targetRef:
    group: ""
    kind: Service
    name: eck-kibana-kb-http
```
執行結果如下圖：
![](https://i.imgur.com/X8UTjr8.jpg)

因為跳出了validate相關的問題，目前懷疑官方doc有點問題，因此想問是否有```networking.gke.io/v1```的spec，謝謝。