Skip to content

Instantly share code, notes, and snippets.

@jbzdak
Last active February 20, 2019 11:12
Show Gist options
  • Save jbzdak/80bbac940db286da2b3acca92295f997 to your computer and use it in GitHub Desktop.
Save jbzdak/80bbac940db286da2b3acca92295f997 to your computer and use it in GitHub Desktop.
webapp.yml
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: simple-ingress
annotations:
kubernetes.io/ingress.global-static-ip-name: "example-public-ip-name"
ingress.gcp.kubernetes.io/pre-shared-cert: "start-example-com"
spec:
rules:
- host: example.example.com
http:
paths:
- backend:
serviceName: example-http-service
servicePort: 80
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: simple-ingress
spec:
rules:
- http:
paths:
- backend:
serviceName: example-http-service
servicePort: 80
---
kind: Service
apiVersion: v1
metadata:
# Unique key of the Service instance
name: example-http-service
annotations:
cloud.google.com/neg: '{"ingress": true}'
spec:
ports:
# Accept traffic sent to port 80
- name: http
port: 80
targetPort: 80
selector:
app: example-webapp
type: NodePort
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: frontend
labels:
app: example-webapp
spec:
selector:
matchLabels:
app: example-webapp
template:
metadata:
labels:
app: example-webapp
spec:
containers:
- name: backend
image: k8s.gcr.io/serve_hostname
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment