|
| 1 | +# Install and run a Feature Store on Kubernetes with the Feast Operator |
| 2 | + |
| 3 | +The following notebooks will guide you through how to install and use Feast on Kubernetes with the Feast Go Operator. |
| 4 | + |
| 5 | +* [01-Install.ipynb](./01-Install.ipynb): Install and configure a Feature Store in Kubernetes with the Operator. |
| 6 | +* [02-Demo.ipynb](./02-Demo.ipynb): Validate the feature store with demo application. |
| 7 | +* [03-Uninstall.ipynb](./03-Uninstall.ipynb): Clear the installed deployments. |
| 8 | + |
| 9 | +# Here are the steps to deploy |
| 10 | + |
| 11 | +* Generate certificates and create kubernetes secrets. |
| 12 | +* helm install postgresql bitnami/postgresql -f values.yaml |
| 13 | +* kubectl apply -f feast.yaml |
| 14 | + |
| 15 | + |
| 16 | +# Some of the important commands to debug while setting up the postgres in TLS setup. |
| 17 | +helm show chart bitnami/postgresql |
| 18 | + |
| 19 | +helm install postgresql -f values.yaml bitnami/postgresql --version 16.4.6 |
| 20 | + |
| 21 | +helm uninstall postgresql |
| 22 | + |
| 23 | +make test |
| 24 | +make docker-build docker-push IMG=quay.io/lrangine/feast-operator:0.53.0 |
| 25 | +make install |
| 26 | +make deploy IMG=quay.io/lrangine/feast-operator:0.53.0 |
| 27 | + |
| 28 | +kubectl exec -it postgresql-0 -- env PGPASSWORD=secret psql -U admin -d mydb -c "SHOW ssl;" |
| 29 | + |
| 30 | +kubectl exec -it postgresql-0 -- env PGPASSWORD=password psql -U admin -d mydatabase -c "SHOW ssl;" |
| 31 | + |
| 32 | + |
| 33 | +kubectl exec -it my-postgres-postgresql-0 -- bash |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | +kubectl create secret generic postgres-tls-secret \ |
| 38 | +--from-file=tls.crt=postgres-certs/server.crt \ |
| 39 | +--from-file=tls.key=postgres-certs/server.key \ |
| 40 | +--from-file=ca.crt=postgres-certs/ca.crt |
| 41 | + |
| 42 | +kubectl create secret generic postgres-tls-certs-new \ |
| 43 | +--from-file=tls.crt=postgres-tls-certs-new/server.crt \ |
| 44 | +--from-file=tls.key=postgres-tls-certs-new/server.key \ |
| 45 | +--from-file=ca.crt=postgres-tls-certs-new/ca.crt |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | +kubectl run -it --rm --image=postgres:latest --restart=Never postgresql-client -- psql "host=postgresql.default.svc.cluster.local dbname=mydatabase user=admin password=mypassword sslmode=require" |
| 50 | + |
| 51 | + |
| 52 | +kubectl exec -it postgresql-client -- psql \ |
| 53 | +"host=postgresql.default.svc.cluster.local dbname=mydatabase user=admin password=mypassword sslmode=verify-full sslcert=/etc/ssl/postgres/client.crt sslkey=/etc/ssl/postgres/client.key sslrootcert=/etc/ssl/postgres/ca.crt" |
| 54 | + |
| 55 | +postgresql+psycopg://admin:password@postgresql.default.svc.cluster.local:5432/mydb?sslmode=require&sslrootcert=postgres-tls-certs/ca.crt&sslcert=postgres-tls-certs/client.crt&sslkey=postgres-tls-certs/client.key |
| 56 | + |
| 57 | + |
| 58 | +kubectl exec -it postgresql-0 -- cat /opt/bitnami/postgresql/conf/postgresql.conf | grep ssl |
| 59 | + |
| 60 | +sslcert=postgres-tls-certs-new/server.crt&sslkey=postgres-tls-certs-new/server.key |
| 61 | + |
| 62 | +postgresql+psycopg://admin:password@localhost:5432/mydatabase?sslmode=disable&sslrootcert=postgres-tls-certs-new/ca.crt&sslcert=postgres-tls-certs-new/server.crt&sslkey=postgres-tls-certs-new/server.key |
| 63 | + |
| 64 | + |
| 65 | +kubectl exec -it postgresql-0 -- env PGPASSWORD=password psql -U admin -d mydatabase -c '\l' |
| 66 | + |
| 67 | + |
| 68 | +helm install postgresql -f values.yaml bitnami/postgresql --version 16.4.6 |
| 69 | + |
| 70 | +helm uninstall postgresql |
| 71 | + |
| 72 | +helm template postgresql bitnami/postgresql --values values.yaml --version 16.4.6 > postgresql-export.yaml |
| 73 | + |
| 74 | + |
| 75 | +kubectl create secret generic postgresql-client-certs \ |
| 76 | +--from-file=ca.crt=./postgres-tls-certs/ca.crt \ |
| 77 | +--from-file=tls.crt=./postgres-tls-certs/client.crt \ |
| 78 | +--from-file=tls.key=./postgres-tls-certs/client.key \ |
| 79 | +--dry-run=client -o yaml | kubectl apply -f - |
| 80 | + |
| 81 | + |
| 82 | +!kubectl exec deploy/postgres -- psql -h localhost -U feast feast -c '\dt' |
| 83 | + |
| 84 | +kubectl exec -it postgresql-0 -- env PGPASSWORD=password psql -U admin -d mydatabase -c '\dt' |
0 commit comments