- Create a secret (for MySQL and Postgres)
kubectl create secret generic postgres-pass --from-literal=password=<password>
kubectl create secret generic mysql-pass --from-literal=password=<password>
kubectl create secret generic onem2m --from-literal=origin=<origin>
- Apply the ConfigMap for the MySQL and PostgreSQL init scripts
kubectl apply -f mysql-configmap.yml -f postgres-configmap.yml
- Apply MySQL, PostgreSQL and Mobius deployment
kubectl apply -f mysql-deployment.yaml -f mobius-deployment.yaml -f postgres-deployment.yaml -f onem2m-recorder-deployment.yaml grafana-deployment.yml
- Manually init the onem2m_recorder DB in PostgreSQL
-
Follow the OVH documentation
-
Check the external IP allocation
kubectl --namespace default get services -o wide -w looming-gnat-nginx-ingress-controller
- Apply the NGINX configuration
kubectl apply -f nginx-ingress.yaml
If you need the k8s dashboard, follow this documentation : https://docs.ovh.com/gb/en/kubernetes/installing-kubernetes-dashboard/
- Create ConfigMap from a file
kubectl create configmap mysql-init-db --from-file=./data/mobiusdb.sql
- Dump ConfigMap into a yaml file (then
kubectl apply
it as any other config file)
kubectl get configmaps mysql-init-db -o yaml > mysql-configmap.yml
- Get pods
kubectl get pods
- Get a shell into a container
kubectl exec -it mosquitto -- /bin/sh
- Get services
kubectl get services
- Get the state of a pod
kubectl describe pods <pod_name>
- View a pod logs
kubectl logs <pod_name>
- Get the URL of a service running into Minikube
minikube service mobius --url