Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
run cassandra on google container engine
$ kubectl config use-context gke_iron-potion-92209_us-central1-a_hello-world
$ kubectl create -f casandra-pod.yaml
$ kubectl create -f cassandra-service.yaml
$ kubectl get endpoints cassandra -o yaml
apiVersion: v1beta3
kind: Endpoints
metadata:
creationTimestamp: 2015-05-22T07:30:24Z
name: cassandra
namespace: default
resourceVersion: "53898"
selfLink: /api/v1beta1/endpoints/cassandra?namespace=default
uid: 694655e9-0054-11e5-815a-42010af013e9
subsets:
- addresses:
- IP: 10.40.1.5
targetRef:
kind: Pod
name: cassandra
namespace: default
resourceVersion: "53826"
uid: 2e9b73bb-0054-11e5-815a-42010af013e9
ports:
- port: 9042
protocol: TCP
$ kubectl get services
NAME LABELS SELECTOR IP PORT(S)
cassandra name=cassandra name=cassandra 10.43.254.112 9042/TCP
kube-dns k8s-app=kube-dns,kubernetes.io/cluster-service=true,name=kube-dns k8s-app=kube-dns 10.43.240.10 53/UDP
53/TCP
kubernetes component=apiserver,provider=kubernetes <none> 10.43.240.2 443/TCP
kubernetes-ro component=apiserver,provider=kubernetes <none> 10.43.240.1 80/TCP
@mingderwang

This comment has been minimized.

Copy link
Owner Author

commented May 22, 2015

mingder7_gmail_com@k8s-hello-world-node-1:$ docker exec -i -t a83c7f0ff66a nodetool status
FATA[0000] Post http:///var/run/docker.sock/v1.18/containers/a83c7f0ff66a/exec: dial unix /var/run/docker.sock: permission denied. Are you trying to connect to a TLS-enabled daemon without TLS?
mingder7_gmail_com@k8s-hello-world-node-1:
$ sudo !!
sudo docker exec -i -t a83c7f0ff66a nodetool status

Datacenter: datacenter1

Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
-- Address Load Tokens Owns (effective) Host ID Rack
UN 10.40.1.5 51.25 KB 256 100.0% 3a37555f-f149-40f4-a0f2-490cd9d1a797 rack1
mingder7_gmail_com@k8s-hello-world-node-1:~$ sudo docker exec -i -t a83c7f0ff66a tail /var/log/cassandra/system.log
INFO [CompactionExecutor:2] 2015-05-22 07:29:01,402 CompactionTask.java:144 - Compacting [SSTableReader(path='/cassandra_data/data/system/local-7ad54392bcdd35a684174e047860b377/system-local-ka-2-Data.db'), SSTableReader(pa
th='/cassandra_data/data/system/local-7ad54392bcdd35a684174e047860b377/system-local-ka-4-Data.db'), SSTableReader(path='/cassandra_data/data/system/local-7ad54392bcdd35a684174e047860b377/system-local-ka-1-Data.db'), SSTable
Reader(path='/cassandra_data/data/system/local-7ad54392bcdd35a684174e047860b377/system-local-ka-3-Data.db')]
INFO [main] 2015-05-22 07:29:01,481 StorageService.java:1554 - Node /10.40.1.5 state jump to normal
INFO [main] 2015-05-22 07:29:01,516 CassandraDaemon.java:512 - Waiting for gossip to settle before accepting client requests...
INFO [CompactionExecutor:2] 2015-05-22 07:29:01,663 CompactionTask.java:271 - Compacted 4 sstables to [/cassandra_data/data/system/local-7ad54392bcdd35a684174e047860b377/system-local-ka-5,]. 5,863 bytes to 5,700 (~97% of
original) in 234ms = 0.023231MB/s. 4 total partitions merged to 1. Partition merge counts were {4:1, }
INFO [main] 2015-05-22 07:29:09,523 CassandraDaemon.java:544 - No gossip backlog; proceeding
INFO [main] 2015-05-22 07:29:09,599 Server.java:149 - Netty using native Epoll event loop
INFO [main] 2015-05-22 07:29:09,637 Server.java:179 - Using Netty Version: [netty-buffer=netty-buffer-4.0.23.Final.208198c, netty-codec=netty-codec-4.0.23.Final.208198c, netty-codec-http=netty-codec-http-4.0.23.Final.20819
8c, netty-codec-socks=netty-codec-socks-4.0.23.Final.208198c, netty-common=netty-common-4.0.23.Final.208198c, netty-handler=netty-handler-4.0.23.Final.208198c, netty-transport=netty-transport-4.0.23.Final.208198c, netty-tra
nsport-rxtx=netty-transport-rxtx-4.0.23.Final.208198c, netty-transport-sctp=netty-transport-sctp-4.0.23.Final.208198c, netty-transport-udt=netty-transport-udt-4.0.23.Final.208198c]
INFO [main] 2015-05-22 07:29:09,637 Server.java:180 - Starting listening for CQL clients on /10.40.1.5:9042...
INFO [main] 2015-05-22 07:29:09,703 ThriftServer.java:119 - Binding thrift service to /10.40.1.5:9160
INFO [Thread-2] 2015-05-22 07:29:09,721 ThriftServer.java:136 - Listening for thrift clients...

@mingderwang

This comment has been minimized.

Copy link
Owner Author

commented May 22, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.