title: How to exposing CockroachDB using Ingress on Google Cloud for external loadtesting
body: <p>For my current distributed databases project in my studies I should deploy a CockrouchDB Cluster on Google Cloud Kubernetes Engine and run a YCSB Loadtest against it.</p>
  <p>The YCSB Client is going to run on another VM so that the results are comparable to other groups results.</p>
  <p>Now I need to expose the DB Console on Port 8080 as well as the Database Endpoint on Port 26257.</p>
  <p>so far I started changing the cockraochdb-public service to <code>kind: NodePort</code> and exposing its ports using an Ingress. My current Problem is exposing both ports (if possible on their default ports 8080 and 26257) and having them accessible from YCSB.</p>
  <pre><code>apiVersion: extensions/v1beta1
  kind: Ingress
  metadata:
    name: cockroachdb-ingress
    annotations:
      kubernetes.io/ingress.global-static-ip-name: cockroachdb-global-ip
      ingress.citrix.com/insecure-service-type: “tcp”
      ingress.citrix.com/insecure-port: “6379”
    labels:
      app: cockroachdb
  spec:
    backend:
      serviceName: cockroachdb-public
      servicePort: 26257
    rules:
    - http:
        paths:
        - path: /labs/*
          backend:
            serviceName: cockroachdb-public
            servicePort: 8080
        - path: /*
          backend:
            serviceName: cockroachdb-public
            servicePort: 26257
  </code></pre>
  <p>So far I just managed to route it to different paths. I'm not sure if this may work, because the JDBC driver used by YCSB is using TCP not http.</p>
  <p>How do I expose two ports of one service using an Ingress for TCP?</p>