Skip to content

Instantly share code, notes, and snippets.

@flavio-fernandes
Last active April 11, 2019 03:07
Show Gist options
  • Save flavio-fernandes/ae524e7afa93bad62a290bd608b1a47b to your computer and use it in GitHub Desktop.
Save flavio-fernandes/ae524e7afa93bad62a290bd608b1a47b to your computer and use it in GitHub Desktop.
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: foo-example
namespace: default
spec:
replicas: 2
template:
metadata:
labels:
app: foo-example
spec:
containers:
- name: foo
# NOTE: Make sure to use the name of your $PROJECT here,
# which is what you provided when doing a docker push
image: gcr.io/knative-proj/foo
ports:
- containerPort: 5000
protocol: TCP
env:
- name: TARGET
value: "Old school deployment"
---
apiVersion: v1
kind: Service
metadata:
labels:
app: foo-example
name: foo-np
namespace: default
spec:
ports:
- port: 8080
protocol: TCP
targetPort: 5000
selector:
app: foo-example
sessionAffinity: None
type: NodePort
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment