cockroachdb / cockroachdb/cockroach-operator

updating httpPort or sqlPort does not update `cockroachdb-public` service port

Open
#498 12 comments 0 reactions 2 assignees Claimed by @udnay View on GitHub
bug
Dominant language
Go
Stars
318
Forks
104
Avg merge
1d 6h
Merged PRs (30d)
1

Description

I deployed a cluster with `httpPort: 8081` and was able to access the DB Console on this port. I subsequently changed this back to `httpPort: 8080` and this successfully performed a rolling restart of the pods with the new port. However, when running `kubectl port-forward service/cockroachdb-public 8080`, I got this error:

```
error: Service cockroachdb-public does not have a service port 8080
```

Running `kubectl get service` shows:

```
cockroachdb-public ClusterIP 10.3.242.84 26258/TCP,8081/TCP,26257/TCP 24m
```

Is there another step that needs to update the service to use the new port?

Note: I was still able to port-forward to `8081`, but this quickly threw errors like

```
E0514 16:50:16.364820 63081 portforward.go:400] an error occurred forwarding 8081 -> 8081: error forwarding port 8081 to pod c86376879927c9d62242ca840a9a4c4d6427fee3b5974e84586e47ac2d88643f, uid : exit status 1: 2021/05/14 20:50:16 socat[94227] E connect(5, AF=2 127.0.0.1:8081, 16): Connection refused
```

as expected.

This is using the Operator version currently at https://github.com/cockroachdb/cockroach-operator/blob/master/manifests/operator.yaml on GKE and CRDB v20.2.8.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.