Посмотреть текущие репозитории helm можно командой:
1 2 3 4 |
$ helm repo list NAME URL stable https://kubernetes-charts.storage.googleapis.com local http://127.0.0.1:8879/charts |
Как вы можете увидеть, по умолчанию подкючён только репозиторий со стабильными чартами и локальный.
Некоторые чарты находятся в репозитории-инкубаторе, например чарт с cassandra. Нужно добавить этот репозиторий в список репозиториев helm, чтобы иметь возможность устанавливать чарты из него:
1 2 |
$ helm repo add incubator https://kubernetes-charts-incubator.storage.googleapis.com/ "incubator" has been added to your repositories |
После этого вы спокойно можете устанавливать чарты из этого репозитория инкубатора:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
$ helm install --namespace "cassandra" -n "cassandra" incubator/cassandra NAME: cassandra LAST DEPLOYED: Thu Mar 22 08:46:15 2018 NAMESPACE: cassandra STATUS: DEPLOYED RESOURCES: ==> v1/Service NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE cassandra-cassandra ClusterIP None <none> 7000/TCP,7001/TCP,7199/TCP,9042/TCP,9160/TCP 1s ==> v1beta1/StatefulSet NAME DESIRED CURRENT AGE cassandra-cassandra 3 1 1s ==> v1/Pod(related) NAME READY STATUS RESTARTS AGE cassandra-cassandra-0 0/1 Pending 0 1s NOTES: Cassandra CQL can be accessed via port 9042 on the following DNS name from within your cluster: Cassandra Thrift can be accessed via port 9160 on the following DNS name from within your cluster: If you want to connect to the remote instance with your local Cassandra CQL cli. To forward the API port to localhost:9042 run the following: - kubectl port-forward --namespace cassandra $(kubectl get pods --namespace cassandra -l app=cassandra-cassandra -o jsonpath='{ .items[0].metadata.name }') 9042:9042 If you want to connect to the Cassandra CQL run the following: - kubectl port-forward --namespace cassandra $(kubectl get pods --namespace cassandra -l "app=cassandra-cassandra" -o jsonpath="{.items[0].metadata.name}") 9042:9042 echo cqlsh 127.0.0.1 9042 You can also see the cluster status by run the following: - kubectl exec -it --namespace cassandra $(kubectl get pods --namespace cassandra -l app=cassandra-cassandra -o jsonpath='{.items[0].metadata.name}') nodetool status To tail the logs for the Cassandra pod run the following: - kubectl logs -f --namespace cassandra $(kubectl get pods --namespace cassandra -l app=cassandra-cassandra -o jsonpath='{ .items[0].metadata.name }') |