Kuberig

Kuberig

  • Docs
  • Blog
  • Help

›Code Samples

Getting started

  • Intro
  • Quick Start
  • DSL Intro

Environments

  • Initializing an Environment
  • Managing Container Versions
  • Environment Support

Resource Coding

  • Coding Resources
  • Resource Grouping
  • Resource Apply Action
  • DSL Details

Code Samples

  • Defining a ConfigMap
  • Defining a Secret
  • Defining a Deployment
  • Defining a Service
  • Defining an Ingress

Reference

  • Configuration
  • Repository Organisation
  • Encryption Support
  • Service Account Setup

Defining a Service

@EnvResource
fun basicService(): ServiceDsl {
    // label can be reused in the deployment definition.
    val label = Pair("app", "my-app")

    return service {
        metadata {
            name("basic-service")
        }
        spec {
            selector(label)
            ports {
                port {
                    port(80)
                    targetPort(8080)
                }
            }
        }
    }
}
Last updated on 12/30/2020
← Defining a DeploymentDefining an Ingress →
Kuberig
Docs
HomeQuick StartDSL Intro
Community
Stack OverflowDiscordTwitter
More
BlogGitHubStar
Follow @kuberigio
Copyright © 2021 Rigeldev BV