Created
September 20, 2017 09:30
-
-
Save j1n6/cc85e2bea7d57353d7df644457c0d89f to your computer and use it in GitHub Desktop.
kube deployment example
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: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: nginx-deployment | |
spec: | |
replicas: 2 | |
template: | |
metadata: | |
labels: | |
app: nginx | |
spec: | |
containers: | |
- name: nginx | |
image: nginx:1.7.9 |
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: v1 | |
kind: Service | |
metadata: | |
name: frontend | |
spec: | |
type: NodePort | |
selector: | |
app: nginx | |
ports: | |
- port: 80 | |
targetPort: 80 | |
nodePort: 30003 |
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
Version: v1 | |
kind: Pod | |
metadata: | |
name: nginx-pod | |
labels: | |
app: nginx | |
spec: | |
containers: | |
- name: nginx | |
image: nginx:1.7.9 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Larger deployment example
https://github.com/microservices-demo/microservices-demo/tree/master/deploy/kubernetes/manifests