Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to expose managed etcd cluster to the outside of the k8s cluster without manually declare svc yaml #140

Open
Battlefield-Pony opened this issue Jun 21, 2022 · 1 comment

Comments

@Battlefield-Pony
Copy link

As I submitted the creation request, there are several ClusterIp exposing etcd cluster TAPP, but if I needto access the etcd cluster, I will need expose an nodePort manually,which is not automated from the operator. Is there a way to espose the etcd cluster without manual exposure?

@engow
Copy link
Contributor

engow commented Jun 21, 2022

Later, dashboard will support tencentyun LoadBalancer type. As for now, I think creating a new svc with NodePort or LoadBalancer is simple way. If kstone was deployed in TKE, the following yaml can be refered.

apiVersion: v1
kind: Service
metadata:
  annotations:
    service.kubernetes.io/qcloud-loadbalancer-internal-subnetid: ${subnetID}
  labels:
    etcdcluster.etcd.tkestack.io/cluster-name: ${etcdName}
  name: ${etcdName}-etcd-lb
  namespace: kstone
spec:
  externalTrafficPolicy: Cluster
  ports:
  - name: client
    port: 2379
    protocol: TCP
    targetPort: 2379
  selector:
    etcdcluster.etcd.tkestack.io/cluster-name: ${etcdName}
  sessionAffinity: None
  type: LoadBalancer
···

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants