# Mapping Machine Types to Autopilot Compute Classes ![](Machine-Types.jpg) Autopilot offers a slightly more abstract view of compute infrastructure than GKE’s Standard mode. The idea is to focus more on the different use-cases than the minutiae of individual machine configurations. However, if you’re coming from GKE Standard or GCE, and know those machine types well, you might want to understand the mapping between the two. Here’s a quick reference for the resulting machine type from an Autopilot nodeSelector. ## CPU Types Sources: - [Compute classes in Autopilot](https://cloud.google.com/kubernetes-engine/docs/concepts/autopilot-compute-classes) - [Choose a minimum CPU platform](http://Choose%20a%20minimum%20CPU%20platform) - [Run fault-tolerant workloads at lower costs in Spot Pods](https://cloud.google.com/kubernetes-engine/docs/how-to/autopilot-spot-pods) Each of these machines can optionally be requested as Spot, by adding an additional node selector for `cloud.google.com/gke-spot: "true"`. For example: Note: the resulting machine from the compute class might change over time, in a backwards compatible way. These selectors go into the Podspec. Here’s an example for a N2D node with the Rome (or better) CPU platform: ```yaml {hl_lines=[16, 17]} apiVersion: apps/v1 kind: Deployment metadata: name: n2d spec: replicas: 1 selector: matchLabels: pod: n2d-pod template: metadata: labels: pod: n2d-pod spec: nodeSelector: cloud.google.com/compute-class: Balanced supported-cpu-platform.cloud.google.com/AMD_Rome: "true" containers: - name: timeserver-container image: docker.io/wdenniss/timeserver:1 resources: requests: cpu: "4" ``` [n2d.yaml](https://github.com/WilliamDenniss/autopilot-examples/blob/master/compute-class/n2d.yaml) I’ve put a [complete set of examples](https://github.com/WilliamDenniss/autopilot-examples/tree/master/compute-class) on github. You can see what machine was assigned to a particular pod by describing the node that it runs on, and looking for the `node.kubernetes.io/instance-type` label. For example: ```shell $ kubectl describe node | grep "node.kubernetes.io/instance-type" node.kubernetes.io/instance-type=e2-standard-2 ``` ## GPU Types Sources: - [Deploy GPU workloads in Autopilot](https://cloud.google.com/kubernetes-engine/docs/how-to/autopilot-gpus) GPU Pods can also be mixed with Spot. See [TensorFlow on GKE Autopilot with GPU acceleration](/k8s/tensorflow-on-gke-autopilot-with-gpu-acceleration/) for a complete example.