sigs.k8s.io/cluster-api-provider-aws@v1.5.5/docs/book/src/topics/images/built-amis.md (about) 1 # Pre-built Kubernetes AMIs 2 3 New AMIs are built whenever a new Kubernetes version is released for each supported OS distribution and then published to supported regions. 4 5 `clusterawsadm ami list` command lists pre-built reference AMIs by Kubernetes version, OS, or AWS region. 6 See [clusterawsadm ami list](../clusterawsadm/clusterawsadm_ami_list.md) for details. 7 8 > **Note:** These images are not updated for security fixes and it is recommended to always use the latest patch version for the Kubernetes version you want to run. For production environments, it is highly recommended to build and use your own custom images. 9 10 ## Supported OS Distributions 11 - Amazon Linux 2 (amazon-2) 12 - Ubuntu (ubuntu-20.04, ubuntu-18.04) 13 - Centos (centos-7) 14 - Flatcar (flatcar-stable) 15 16 ## Supported AWS Regions 17 - ap-northeast-1 18 - ap-northeast-2 19 - ap-south-1 20 - ap-southeast-1 21 - ap-northeast-2 22 - ca-central-1 23 - eu-central-1 24 - eu-west-1 25 - eu-west-2 26 - eu-west-3 27 - sa-east-1 28 - us-east-1 29 - us-east-2 30 - us-west-1 31 - us-west-2 32 33 ## Most recent AMIs 34 <table id="amis" class="display" style="width:100%"></table> 35 36 <script> 37 const amisURL = "https://d2jcv1y6kf3xwc.cloudfront.net/amis.json"; 38 const SEARCH_HOTKEY_KEYCODE = 83; 39 40 // hasFocus returns true if the table search is active 41 function hasFocus() { 42 const tableSearchBar = document.querySelector("#amis_filter > label > input[type=search]"); 43 return (tableSearchBar === document.activeElement); 44 } 45 46 // Prevent the mdbook search event listener capturing the 's' key, so users can search for example 'eu-west-1 47 function resetKeyHandler(e) { 48 if (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey || e.target.type === 'textarea' || e.target.type === 'text') { return; } 49 50 if (e.keyCode === SEARCH_HOTKEY_KEYCODE && hasFocus()) { 51 e.stopPropagation(); 52 } 53 } 54 55 // Insert the event listener when the document is ready 56 $(function() { 57 document.addEventListener('keydown', function (e) { resetKeyHandler(e); }, true); 58 }); 59 60 // Table display function 61 function amiListToTable(data) { 62 const items = data.items.map( 63 item => { 64 65 url = `https://console.aws.amazon.com/ec2/v2/home?region=${item.spec.region}#Images:visibility=public-images;search=${item.spec.imageID};sort=name` 66 67 imageText = `<a href="${url}">${item.spec.imageID}</a>` 68 69 return [ 70 item.metadata.name, 71 item.spec.os, 72 item.spec.region, 73 item.spec.kubernetesVersion, 74 imageText, 75 item.metadata.creationTimestamp, 76 ] 77 } 78 ) 79 80 $(document).ready(function() { 81 const table = $('#amis').DataTable({ 82 data: items, 83 columns: [ 84 {title: "Name"}, 85 {title: "OS"}, 86 {title: "Region"}, 87 {title: "Kubernetes Version"}, 88 {title: "Image ID"}, 89 {title: "Creation Date"}, 90 ] 91 }) 92 93 table 94 .order([3, 'dsc'], [2, 'asc'], [1, 'asc']) 95 .draw(); 96 }); 97 } 98 99 100 // Lazy fetch the URL 101 fetch(amisURL, { 102 mode: 'cors' 103 }) 104 .then(response => response.json()) 105 .then(data => amiListToTable(data)) 106 .catch((error) => console.error('Error:', error)); 107 </script> 108 109 If you want to query any other AMI which is not listed in the table, then use below command 110 ``` 111 clusterawsadm ami list --kubernetes-version <some-k8s-version> --region <supported-aws-region> --os <supported-os-name> 112 ```