Skip to content

Instantly share code, notes, and snippets.

@pulumipus
Last active July 17, 2020 18:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pulumipus/057ca0abb4758161a4d3ce2698e9683a to your computer and use it in GitHub Desktop.
Save pulumipus/057ca0abb4758161a4d3ce2698e9683a to your computer and use it in GitHub Desktop.
Headless service spec for stateless application
const mariadbSvc = new k8s.core.v1.Service("mariadb", {
metadata: {
name: "mariadb",
},
spec: {
type: "ClusterIP",
clusterIP: "None",
ports: [
{
name: "mysql",
port: 3306,
targetPort: "mysql"
}
],
selector: {
app: "mariadb",
component: "master",
release: "example"
}
}
}, { provider: provider });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment