Last active
October 24, 2018 20:18
-
-
Save protometa/77a45a2d7207cdfb6b4cc11f82c42def to your computer and use it in GitHub Desktop.
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: | |
labels: | |
run: nginx | |
name: nginx | |
spec: | |
replicas: 10 | |
selector: | |
matchLabels: | |
run: nginx | |
template: | |
metadata: | |
labels: | |
run: nginx | |
spec: | |
containers: | |
- image: nginx | |
name: nginx | |
ports: | |
- containerPort: 80 | |
protocol: TCP | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: nginx | |
spec: | |
ports: | |
- port: 80 | |
protocol: TCP | |
targetPort: 80 | |
selector: | |
run: nginx | |
sessionAffinity: None | |
type: ClusterIP | |
--- | |
apiVersion: extensions/v1beta1 | |
kind: Ingress | |
metadata: | |
name: test-ingress | |
annotations: | |
kubernetes.io/ingress.class: nginx | |
nginx.ingress.kubernetes.io/affinity: cookie | |
nginx.ingress.kubernetes.io/session-cookie-hash: sha1 | |
nginx.ingress.kubernetes.io/session-cookie-name: sticky-01 | |
spec: | |
rules: | |
# some domain that hits your nginx controller service lb | |
- host: nginx.example.com | |
http: | |
paths: | |
- backend: | |
serviceName: nginx | |
servicePort: 80 | |
path: / | |
--- | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment