You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
kubectl get po -o wide -A ### get all pods
kubectl logs xxxxx -n yyyy ### get xxx pods logs in namespace yyy
kubectl describe pod xxxx -n yyyy ### describe pod xxx in namespace yyy
Pre reqs
Docker
https://docs.docker.com/install/linux/docker-ce/ubuntu/
faas-cli/faas
helm
sudo snap install helm --classic
DinD, Docker in Docker (https://github.com/kubernetes-sigs/kubeadm-dind-cluster/blob/master/dind-cluster.sh) One can look into KinD Kubernetes in Docker kubernetes-retired/kubeadm-dind-cluster#310
Starting k8s cluster
OpenFaas install
Visiting OpenFaas UI
Visit $ip:31112 with username: admin, password: password
Creating OpenFaas functions
Visit UI to invoke your function or try out the
faas invoke
command.Kafka k8s cluster (3zk + 3 kafka) + testpod for executing commands
Misc commands
Consuming messages from topic: faas-request-test
kubectl -n kafka exec -it testclient -- kafka-console-consumer --bootstrap-server kf-kafka:9092 --topic faas-request-test --from-beginning
Listing topics
kubectl -n kafka exec testclient -- kafka-topics --zookeeper kf-zookeeper:2181 --list
Creating topics
kubectl -n kafka exec testclient -- kafka-topics --zookeeper kf-zookeeper:2181 --topic test1 --create --partitions 1 --replication-factor 1
Starting an interactive message producer session:
kubectl -n kafka exec -ti testclient -- kafka-console-producer --broker-list kf-kafka-headless:9092 --topic test1
To create a message in the above session, simply type the message and press "enter"
To end the producer session try: Ctrl+C
Lists all containers inside of pods
kubectl get pods --all-namespaces -o jsonpath="{..image}" |tr -s '[[:space:]]' '\n' |sort |uniq -c
Loading docker image into a target node (useful for DinD, KinD has a CLI command that does this for you)
docker save {your_image} | docker exec -i {target_node} docker load
Misc Links
https://github.com/openfaas/faas-netes/blob/master/chart/kafka-connector/development.md
https://github.com/s8sg/faas-flow workflow/function composition
The text was updated successfully, but these errors were encountered: