Last active
August 29, 2015 14:28
-
-
Save iocanel/60a90261b8dc6f6fa08e to your computer and use it in GitHub Desktop.
Kubernetes Service with Java Fluent Builder
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
Service srv = new ServiceBuilder() | |
.withNewMetadata() | |
.withName("kubernetes") | |
.addToLabels("component", "apiserver") | |
.addToLabels("provider", "kubernetes") | |
.endMetadata() | |
.withNewSpec() | |
.addNewPort() | |
.withProtocol("TCP") | |
.withPort(443) | |
.withNewTargetPort(443) | |
.endPort() | |
.withPortalIP("172.30.17.2") | |
.withSessionAffinity("None") | |
.endSpec() | |
.build(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment