Last active
December 8, 2015 23:23
-
-
Save cjcullen/2aad7d51b76b190e2193 to your computer and use it in GitHub Desktop.
Workaround for GCE LB Issue
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
Work around GCE LB issue by setting service session affinity by adding: | |
"sessionAffinity": "ClientIP" | |
to the service spec. This will give you sticky sessions, but will get GCE external LB services again. |
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
{ | |
"kind": "Service", | |
"apiVersion": "v1", | |
"metadata": { | |
"name": "my-service" | |
}, | |
"spec": { | |
"selector": { | |
"app": "MyApp" | |
}, | |
"ports": [ | |
{ | |
"protocol": "TCP", | |
"port": 80, | |
"targetPort": 9376 | |
} | |
], | |
"sessionAffinity": "ClientIP" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Or using
kubectl expose
: