Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support GKE Autopilot #21

Open
nikhiljha opened this issue Feb 15, 2024 · 5 comments
Open

Support GKE Autopilot #21

nikhiljha opened this issue Feb 15, 2024 · 5 comments

Comments

@nikhiljha
Copy link

When running the helm install command given in the dashboard...

Release "kubecost-cloud" does not exist. Installing it now.
W0215 14:30:11.250680   80804 warnings.go:70] autopilot-default-resources-mutator:Autopilot updated DaemonSet kubecost-cloud/kubecost-cloud-network-costs: adjusted resources to meet requirements for containers [kubecost-cloud-network-costs] (see http://g.co/gke/autopilot-resources)
W0215 14:30:11.357355   80804 warnings.go:70] autopilot-default-resources-mutator:Autopilot updated Deployment kubecost-cloud/kubecost-cloud-prometheus-server: defaulted unspecified resources for containers [prometheus-server-configmap-reload, prometheus-server] (see http://g.co/gke/autopilot-defaults)
W0215 14:30:11.369829   80804 warnings.go:70] autopilot-default-resources-mutator:Autopilot updated Deployment kubecost-cloud/kubecost-cloud-cloud-agent: defaulted unspecified resources for containers [kubecost-cloud-cloud-agent] (see http://g.co/gke/autopilot-defaults)
Error: 1 error occurred:
	* admission webhook "warden-validating.common-webhooks.networking.gke.io" denied the request: GKE Warden rejected the request because it violates one or more constraints.
Violations details: {"[denied by autogke-disallow-hostnamespaces]":["enabling hostNetwork is not allowed in Autopilot."],"[denied by autogke-disallow-privilege]":["container kubecost-cloud-network-costs is privileged; not allowed in Autopilot"],"[denied by autogke-no-host-port]":["container kubecost-cloud-network-costs specifies host ports [3001], which are disallowed in Autopilot."],"[denied by autogke-no-write-mode-hostpath]":["hostPath volume nf-conntrack in container kubecost-cloud-network-costs is accessed in write mode; disallowed in Autopilot.","hostPath volume netfilter in container kubecost-cloud-network-costs is accessed in write mode; disallowed in Autopilot."]}
@dwbrown2
Copy link

@AjayTripathy @mbolt35 do you know how we are handling this? I believe hostnetwork access is required for this pod.

@nikhiljha are you able to confirm everything deployed as expected without network-costs enabled?

@AjayTripathy
Copy link

I can confirm hostnetwork access is required for network costs. It's currently a hard requirement though we can take this into consideration for future releases.

Note that you can still view network costs in GKE autopilot with GKE cost report integration; we just won't be able to break it down precisely on a per-pod basis. Instead, each pod gets a cost-weighted share of the node's network price based on the node it's running on

@nikhiljha
Copy link
Author

I wanted something like kubectl cost that would show me a list of pods and the $/hr they cost (which should be fairly simple for autopilot) but it doesn't look like kubecost can do this so I gave up :(

@AjayTripathy
Copy link

Hi @nikhiljha it's surprising that this doesn't work out of the box. Can you share the exact helm install command you used?

@AjayTripathy
Copy link

Also, you can try to run the helm command with
--set networkCosts.enable=true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants