Skip to content

Instantly share code, notes, and snippets.

@thesandlord
Last active February 25, 2019 07:27
Show Gist options
  • Save thesandlord/8b1cd8c2e34c14d1123cbeafa0add6e2 to your computer and use it in GitHub Desktop.
Save thesandlord/8b1cd8c2e34c14d1123cbeafa0add6e2 to your computer and use it in GitHub Desktop.
Federated Ingress on Google Container Engine
// Copyright 2017, Google, Inc.
// Licensed under the Apache License, Version 2.0 (the "License")
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: web
spec:
replicas: 12
template:
metadata:
labels:
name: web
spec:
containers:
- name: web
image: nginx:1.8
imagePullPolicy: Always
ports:
- containerPort: 80
// Copyright 2017, Google, Inc.
// Licensed under the Apache License, Version 2.0 (the "License")
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: web
annotations:
kubernetes.io/ingress.global-static-ip-name: "kubernetes-ingress"
spec:
backend:
serviceName: web
servicePort: 80
// Copyright 2017, Google, Inc.
// Licensed under the Apache License, Version 2.0 (the "License")
apiVersion: v1
kind: Service
metadata:
name: web
spec:
ports:
- port: 80
targetPort: 80
protocol: TCP
nodePort: 30036
selector:
name: web
type: NodePort
gcloud compute addresses create kubernetes-ingress --global
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment