# Kubernetes deployment Round #2

**URL:** <https://forum.yugabyte.com/t/kubernetes-deployment-round-2/195>\
**Category:** General\
**Created:** [September 12, 2018, 3:53am UTC](https://forum.yugabyte.com/t/kubernetes-deployment-round-2/195 "2018-09-12T03:53:17Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![dlink7](https://avatars.discourse-cdn.com/v4/letter/d/2acd7d/32.png) [@dlink7](https://forum.yugabyte.com/u/dlink7)\
**Post date:** [September 12, 2018, 3:53am UTC](https://forum.yugabyte.com/t/kubernetes-deployment-round-2/195/1 "2018-09-12T03:53:17Z")

</div>

![image](https://canada1.discourse-cdn.com/flex027/uploads/yugabyte/original/1X/b757c274ded415c8e2c0f9c90761cb7084156697.png)

I am not sure why this happening. I used a NodePort instead of the LoadBalance port to get around setting up an ingress. Maybe I still have too?

When i ran:

kubectl exec -it yb-tserver-0 /home/yugabyte/bin/cqlsh  
Connection error: (‘Unable to connect to any servers’, {‘127.0.0.1’: error(111, “Tried connecting to [(‘127.0.0.1’, 9042)]. Last error: Connection refused”)})  
command terminated with exit code 1

this is on bare-metal

```
indent preformatted text by 4 spaces

```

kubectl describe po yb-tserver-0  
Name: yb-tserver-0  
Namespace: default  
Node: fleet-94b9c3-k8s-worker-0/10.4.222.185  
Start Time: Tue, 11 Sep 2018 23:35:05 -0400  
Labels: app=yb-tserver  
controller-revision-hash=yb-tserver-578cd855  
[statefulset.kubernetes.io/pod-name=yb-tserver-0](http://statefulset.kubernetes.io/pod-name=yb-tserver-0)  
Annotations:   
Status: Running  
IP: 10.99.1.251  
Controlled By: StatefulSet/yb-tserver  
Containers:  
yb-tserver:  
Container ID: docker://ada7f909a93f0604cccd90d7fb69db3886eb257115a28308dcc1e2299dfdb711  
Image: yugabytedb/yugabyte:latest  
Image ID: docker-pullable://docker.io/yugabytedb/yugabyte@sha256:8804b7f2bcae983b30b4762b2ba2c6e47db017b097aa24207c8c279c71d32306  
Ports: 9000/TCP, 9100/TCP, 9042/TCP, 6379/TCP  
Host Ports: 0/TCP, 0/TCP, 0/TCP, 0/TCP  
Command:  
/home/yugabyte/bin/yb-tserver  
–fs\_data\_dirs=/mnt/data0  
–tserver\_master\_addrs=yb-masters.default.svc.cluster.local:7100  
–tserver\_master\_replication\_factor=3  
State: Running  
Started: Tue, 11 Sep 2018 23:35:47 -0400  
Ready: True  
Restart Count: 0  
Environment:   
Mounts:  
/mnt/data0 from datadir (rw)  
/var/run/secrets/kubernetes.io/serviceaccount from default-token-twj2x (ro)  
Conditions:  
Type Status  
Initialized True  
Ready True  
PodScheduled True  
Volumes:  
datadir:  
Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)  
ClaimName: datadir-yb-tserver-0  
ReadOnly: false  
default-token-twj2x:  
Type: Secret (a volume populated by a Secret)  
SecretName: default-token-twj2x  
Optional: false  
QoS Class: BestEffort  
Node-Selectors:   
Tolerations:   
Events:  
Type Reason Age From Message

* * *

Normal Scheduled 12m default-scheduler Successfully assigned yb-tserver-0 to fleet-94b9c3-k8s-worker-0  
Normal SuccessfulAttachVolume 12m attachdetach-controller AttachVolume.Attach succeeded for volume “pvc-f2937ba4-b088-11e8-8d59-506b8d2df073”  
Normal SuccessfulMountVolume 12m kubelet, fleet-94b9c3-k8s-worker-0 MountVolume.SetUp succeeded for volume “default-token-twj2x”  
Normal SuccessfulMountVolume 12m kubelet, fleet-94b9c3-k8s-worker-0 MountVolume.SetUp succeeded for volume “pvc-f2937ba4-b088-11e8-8d59-506b8d2df073”  
Normal Pulling 12m kubelet, fleet-94b9c3-k8s-worker-0 pulling image “yugabytedb/yugabyte:latest”  
Normal Pulled 12m kubelet, fleet-94b9c3-k8s-worker-0 Successfully pulled image “yugabytedb/yugabyte:latest”  
Normal Created 12m kubelet, fleet-94b9c3-k8s-worker-0 Created container  
Normal Started 12m kubelet, fleet-94b9c3-k8s-worker-0 Started container  
indent preformatted text by 4 spaces

---

<div class="post-metadata">

**Author:** ![karthik](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.yugabyte.com/karthik/32/13_2.png) [@karthik](https://forum.yugabyte.com/u/karthik)\
**Post date:** [September 12, 2018, 5:01am UTC](https://forum.yugabyte.com/t/kubernetes-deployment-round-2/195/2 "2018-09-12T05:01:04Z")

</div>

Hmm not sure about why the nodeport fails… could you also post the output of the services so we can check the bindings:

```auto
kubectl get svc

```

> [@dlink7](#):
>
> kubectl exec -it yb-tserver-0 /home/yugabyte/bin/cqlsh

I think the process does not bind on localhost. Could you try:

```auto
kubectl exec -it yb-tserver-0 /home/yugabyte/bin/cqlsh yb-tserver-0.yb-tservers

```

Also, seems like the master did not get elected, would be good to see the master logs. You can find them on the yb-master pods at the following location:

```auto
# Attach to the master pod
$ kubectl exec -it yb-master-0 bash

# Logs are present here
$ vi /mnt/disk0/yb-data/master/logs/yb-master.INFO

```

Could you please upload the logs? We can also do a hangout if thats easier.

---

<div class="post-metadata">

**Author:** ![dlink7](https://avatars.discourse-cdn.com/v4/letter/d/2acd7d/32.png) [@dlink7](https://forum.yugabyte.com/u/dlink7)\
**Post date:** [September 12, 2018, 3:22pm UTC](https://forum.yugabyte.com/t/kubernetes-deployment-round-2/195/3 "2018-09-12T15:22:14Z")

</div>

> [@karthik](#):
>
> kubectl get svc

Maybe the below is a sign of firewall issues on the worker nodes, i will go check that out.  
indent preformatted text by 4 spaces  
kubectl exec -it yb-tserver-0 /home/yugabyte/bin/cqlsh yb-tserver-0.yb-tservers  
Connection error: (‘Unable to connect to any servers’, {‘10.99.1.251’: error(111, “Tried connecting to [(‘10.99.1.251’, 9042)]. Last error: Connection refused”)})  
command terminated with exit code 1  
indent preformatted text by 4 spaces

/mnt/disk0/ this directory appears to be empty. - i will maybe manually delete the PV and see if that helps

`Preformatted text`kubectl describe svc yb-master-ui  
Name: yb-master-ui  
Namespace: default  
Labels: app=yb-master  
Annotations:   
Selector: app=yb-master  
Type: NodePort  
IP: 10.88.0.105  
Port: ui 7000/TCP  
TargetPort: 7000/TCP  
NodePort: ui 31535/TCP  
Endpoints: 10.99.1.252:7000,10.99.2.254:7000,10.99.3.24:7000  
Session Affinity: None  
External Traffic Policy: Cluster`Preformatted text`

---

<div class="post-metadata">

**Author:** ![dlink7](https://avatars.discourse-cdn.com/v4/letter/d/2acd7d/32.png) [@dlink7](https://forum.yugabyte.com/u/dlink7)\
**Post date:** [September 12, 2018, 3:23pm UTC](https://forum.yugabyte.com/t/kubernetes-deployment-round-2/195/4 "2018-09-12T15:23:04Z")

</div>

If you have time today,a hangout would be good to but please don’t me get in the way more important things

---

<div class="post-metadata">

**Author:** ![dlink7](https://avatars.discourse-cdn.com/v4/letter/d/2acd7d/32.png) [@dlink7](https://forum.yugabyte.com/u/dlink7)\
**Post date:** [September 12, 2018, 3:34pm UTC](https://forum.yugabyte.com/t/kubernetes-deployment-round-2/195/5 "2018-09-12T15:34:42Z")

</div>

Wow sleep is good! The PV didn’t respect the claim i guess. Delete them, reran and I am good!

Just need a easy way to thru some load at it and then video time.

Thanks

---

<div class="post-metadata">

**Author:** ![dlink7](https://avatars.discourse-cdn.com/v4/letter/d/2acd7d/32.png) [@dlink7](https://forum.yugabyte.com/u/dlink7)\
**Post date:** [September 14, 2018, 2:51pm UTC](https://forum.yugabyte.com/t/kubernetes-deployment-round-2/195/7 "2018-09-14T14:51:16Z")

</div>

[https://youtu.be/oOP3c7\_ILgs](https://youtu.be/oOP3c7_ILgs) - thanks for the help again

---

<div class="post-metadata">

**Author:** ![karthik](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.yugabyte.com/karthik/32/13_2.png) [@karthik](https://forum.yugabyte.com/u/karthik)\
**Post date:** [September 14, 2018, 5:01pm UTC](https://forum.yugabyte.com/t/kubernetes-deployment-round-2/195/8 "2018-09-14T17:01:54Z")

</div>

Loving the demo @dlink7!! Thats awesome! Thanks for sharing.
