Title
#fleet
pvirani

pvirani

08/12/2021, 8:38 PM
Hey friends! Has anyone here deployed FleetDM using Kubectl? I am super new to all things Kubernetes and trying to deploy Fleet using Kubectl and not sure how to do it
8:43 PM
also how do I deploy osquery on a Kubernetes cluster?
Martavis Parker

Martavis Parker

08/12/2021, 9:18 PM
Hi @pvirani! You can find that information on this doc. Let me know if that helps.
pvirani

pvirani

08/12/2021, 9:26 PM
Thanks Martavis! It kinda helps but not exactly lol ...
helm init
isn't a command apparently
9:34 PM
The doc says 
The MySQL that we will use for this tutorial is not replicated and it is not Highly Available. If you're deploying Fleet on a Kubernetes managed by a cloud provider (GCP, Azure, AWS, etc), I suggest using their MySQL product if possible as running HA MySQL in Kubernetes can be difficult.
Does that mean I should use RDS Mysql or try and set up a mysql database on my kubernets cluster? 🤔
Martavis Parker

Martavis Parker

08/12/2021, 10:01 PM
For
helm
, you will need to install it to follow our docs. Assuming you are on Amazon EKS, here is the doc for that. As for MySQL, RDS is fine. Your Kubernetes cluster is able to connect to it.
pvirani

pvirani

08/12/2021, 10:18 PM
nevermind I ended up creating a MySQL database in RDS and updated the
fleet-migrations.yml
to reflect that
10:18 PM
$ aws-okta exec dev-write -- kubectl create -f ./docs/1-Using-Fleet/configuration-files/kubernetes/fleet-migrations.yml

job.batch/fleet-prepare-db created
So far so good. Moving on to the next steps now
10:22 PM
updated it in
fleet-deployment.yml
as well
10:26 PM
Stuck here
$ kubectl apply -f ./docs/1-Using-Fleet/configuration-files/kubernetes/fleet-deployment.yml 
error: unable to recognize "./docs/1-Using-Fleet/configuration-files/kubernetes/fleet-deployment.yml": no matches for kind "Deployment" in version "apps/v1beta2"
exit status 1
10:29 PM
changed
apiVersion: apps/v1beta2
to
apps/v1
in the deployment.yml file and that worked
10:56 PM
kubectl logs fleet-prepare-db-pb8pw    
Error from server (BadRequest): container "fleet" in pod "fleet-prepare-db-pb8pw" is waiting to start: image can't be pulled
exit status 1
wonder why the image can't be pulled here 🤔
zwass

zwass

08/12/2021, 11:52 PM
@pvirani this seems like it might not be Fleet-specific, and we limit our bandwidth on Slack to focus on writing code and delivering new features so can only help out a limited amount when the issues become less Fleet-specific 🙂 that said, I've seen issues with pulling containers on AWS when the security groups are not configured to allow the necessary egress, there's no route to the container registry, and similar. Hope that helps!
pvirani

pvirani

08/12/2021, 11:59 PM
yep troubleshooting now
12:00 AM
and ofcourse I get it. I enjoy debugging things anyways so not really expecting y'all to chime in here at all ... this is more of sharing to see if anyone else in the community has seen this stuff and already knows what's up by any chance
zwass

zwass

08/13/2021, 12:06 AM
Folks in the community are often helpful 🙂 thanks y'all!