Skip to content

Instantly share code, notes, and snippets.

@Neutrollized
Last active June 4, 2022 00:41
Show Gist options
  • Save Neutrollized/9fba108124eb79c20901ff1feba9de00 to your computer and use it in GitHub Desktop.
Save Neutrollized/9fba108124eb79c20901ff1feba9de00 to your computer and use it in GitHub Desktop.
Medium: Getting started with GKE Gateway controller
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: store-v1
namespace: store-ns
spec:
replicas: 2
selector:
matchLabels:
app: store
version: v1
template:
metadata:
labels:
app: store
version: v1
spec:
containers:
- name: whereami
image: gcr.io/google-samples/whereami:v1.1.3
ports:
- containerPort: 8080
env:
- name: METADATA
value: "store-v1"
---
apiVersion: v1
kind: Service
metadata:
name: store-v1
namespace: store-ns
annotations:
cloud.google.com/neg: '{"ingress": true}'
spec:
selector:
app: store
version: v1
ports:
- port: 8080
targetPort: 8080
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: store-german
namespace: store-ns
spec:
replicas: 2
selector:
matchLabels:
app: store
version: german
template:
metadata:
labels:
app: store
version: german
spec:
containers:
- name: whereami
image: gcr.io/google-samples/whereami:v1.1.3
ports:
- containerPort: 8080
env:
- name: METADATA
value: "Gutentag!"
---
apiVersion: v1
kind: Service
metadata:
name: store-german
namespace: store-ns
annotations:
cloud.google.com/neg: '{"ingress": true}'
spec:
selector:
app: store
version: german
ports:
- port: 8080
targetPort: 8080
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment