We're looking to migrate our standard GKE cluster to autopilot, but several pods that we have doesn't require much CPU/memory after they started up. However, during startup, we would like some pods to get more CPU so that they start faster. For example, consider this pod:
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-pod
labels:
name: my-pod
spec:
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
name: my-pod
template:
metadata:
labels:
name: my-pod
version: "1.0.0"
spec:
containers:
- name: my-pod
image: "europe-west1-docker.pkg.dev/my-repo/my-pod:1.0.0"
resources:
requests:
memory: "1024Mi"
cpu: "500m"
...
This pod could take 2-3 minutes to start up. If we change CPU to 2000m, it starts much faster. But this pod is long-running, and it's unnecessary for us to pay for 2000m when 500m (or less) is required once it's up and running. I'm looking for something similar to Cloud Run Startup Boost but for GKE Autopilot.
Does something like this exist?
Unfortunately no. Kubernetes itself doesn't have this feature.
Maybe you should look for ways to optimise the startup time of the container itself.