Install k8ssandra per k8ssandra.io
helm install -f k8ssandra.yaml k8ssandra k8ssandra/k8ssandra
watch kubectl get pods
kubectl get secret k8ssandra-superuser -o jsonpath="{.data.username}" | base64 --decode ; echo
kubectl get secret k8ssandra-superuser -o jsonpath="{.data.password}" | base64 --decode ; echo
kubectl port-forward svc/k8ssandra-dc1-stargate-service 8080 8081 8082 9042
kubectl exec -it k8ssandra-dc1-default-sts-0 -- bash -c "wget https://raw.githubusercontent.com/ds-steven-matison/k8ssandra-docker/master/demo.cql -P /tmp && /opt/cassandra/bin/cqlsh localhost 9042 -u k8ssandra-superuser -p [pass above] -f /tmp/demo.cql"
kubectl apply -f deployment.k8s.yaml
kubectl port-forward deployments/k8ssandra-docker 1337:80
After port fwd access app @ http://localhost:1337.
kubectl exec -it deployments/k8ssandra-docker /bin/bash
💡 Use the command tail -f /var/log/php5-fpm.log to check PHP Errors. You can also find the app source at /usr/share/nginx/html.
Current Docker image.
- Git clone [this repo]
- Next build and push image
docker build . -t dsstevenmatison/k8ssandra-docker
docker push dsstevenmatison/k8ssandra-docker
- Edit deployment.k8s.yaml accordingly then
kubectl apply -f deployment.k8s.yaml
- If you are just updating the image, murder the pod and it will recreate w/ new image
kubectl delete pod k8ssandra-docker-6fd6b955f6-6ldk5
💡 Monitor your watch kubectl get pods terminal and watch this pod terminate and recreate!!!
NAME READY STATUS RESTARTS AGE
k8ssandra-kube-prometheus-operator-85695ffb-f42fv 1/1 Running 0 25m
k8ssandra-reaper-operator-b67dc8cdf-j5hnw 1/1 Running 0 25m
prometheus-k8ssandra-kube-prometheus-prometheus-0 2/2 Running 1 24m
k8ssandra-cass-operator-7c876d6d96-4pdjr 1/1 Running 0 25m
k8ssandra-grafana-5c6d5b8f5f-fj9r4 2/2 Running 0 25m
k8ssandra-dc1-default-sts-0 2/2 Running 0 24m
k8ssandra-reaper-655fc7dfc6-dct2n 1/1 Running 0 20m
k8ssandra-dc1-stargate-77d4985d67-gfjwq 1/1 Running 0 25m
k8ssandra-docker-576fbdbd97-4kl2x 1/1 Running 0 3m43s