Last active
August 2, 2023 08:19
-
-
Save Phathdt/c000c06bd37d960f81a86af982e80c78 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: nginx-demo | |
namespace: demo-gateway | |
spec: | |
replicas: 3 | |
selector: | |
matchLabels: | |
app: nginx-demo | |
template: | |
metadata: | |
labels: | |
app: nginx-demo | |
annotations: | |
consul.hashicorp.com/connect-inject: 'true' | |
spec: | |
containers: | |
- name: nginx-demo | |
image: nginx:1.25-alpine | |
ports: | |
- containerPort: 80 | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: nginx-demo | |
namespace: demo-gateway | |
annotations: | |
cloud.google.com/neg: '{"ingress": true}' | |
spec: | |
selector: | |
app: nginx-demo | |
ports: | |
- port: 9090 | |
targetPort: 80 | |
--- | |
kind: HTTPRoute | |
apiVersion: gateway.networking.k8s.io/v1beta1 | |
metadata: | |
name: route-external-nginx-demo | |
namespace: demo-gateway | |
spec: | |
parentRefs: | |
- kind: Gateway | |
name: external-http | |
namespace: default | |
hostnames: | |
- 'nginx1.kanesa.xyz' | |
rules: | |
- matches: | |
- path: | |
value: / | |
backendRefs: | |
- name: nginx-demo | |
port: 9090 | |
--- | |
apiVersion: networking.gke.io/v1 | |
kind: HealthCheckPolicy | |
metadata: | |
name: nginx-lb-healthcheck | |
namespace: demo-gateway | |
spec: | |
default: | |
config: | |
type: HTTP | |
httpHealthCheck: | |
port: 80 | |
requestPath: / | |
targetRef: | |
group: '' | |
kind: Service | |
name: nginx-demo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment