mirror of https://github.com/kubernetes/kops.git
Merge pull request #14614 from hakman/update_aws-ssm_docs
Add minimum version for specifying an AMI through an SSM parameter
This commit is contained in:
commit
aa6d86bf0a
|
|
@ -2,14 +2,13 @@
|
|||
|
||||
As of Kubernetes 1.18 the default images used by kOps are the **[official Ubuntu 20.04](#ubuntu-2004-focal)** images.
|
||||
|
||||
You can choose a different image for an instance group by editing it with `kops edit ig nodes`. You should see an `image` field in one of the following formats:
|
||||
You can choose a different image for an instance group by editing it with `kops edit ig nodes`.
|
||||
|
||||
* `ami-abcdef` - specifies an AMI by id directly
|
||||
* `<owner>/<name>` specifies an AMI by its owner's account ID and name properties
|
||||
* `<alias>/<name>` specifies an AMI by its [owner's alias](#owner-aliases) and name properties
|
||||
* `ssm:<ssm_parameter>` specifies an AMI through an SSM parameter
|
||||
|
||||
Using the AMI id is precise, but ids vary by region. It is often more convenient to use the `<owner/alias>/<name>` if equivalent images with the same name have been copied to other regions.
|
||||
For AWS, you should set the `image` field in one of the following formats:
|
||||
* `ami-abcdef` - specifies an image by id directly (image id is precise, but ids vary by region)
|
||||
* `<owner>/<name>` specifies an image by its owner's account ID and name properties
|
||||
* `<alias>/<name>` specifies an image by its [owner's alias](#owner-aliases) and name properties
|
||||
* `ssm:<ssm_parameter>` specifies an image through an SSM parameter (kOps 1.25.3+)
|
||||
|
||||
```yaml
|
||||
image: ami-00579fbb15b954340
|
||||
|
|
@ -18,10 +17,6 @@ image: ubuntu/ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-20200423
|
|||
image: ssm:/aws/service/canonical/ubuntu/server/20.04/stable/current/amd64/hvm/ebs-gp2/ami-id
|
||||
```
|
||||
|
||||
You can find the name for an image using:
|
||||
|
||||
`aws ec2 describe-images --region us-east-1 --image-id ami-00579fbb15b954340`
|
||||
|
||||
## Security Updates
|
||||
|
||||
Automated security updates are handled by kOps for Debian, Flatcar and Ubuntu distros. This can be disabled by editing the cluster configuration:
|
||||
|
|
@ -93,10 +88,18 @@ additionalUserData:
|
|||
Available images can be listed using:
|
||||
|
||||
```bash
|
||||
# Amazon Web Services (AWS)
|
||||
aws ec2 describe-images --region us-east-1 --output table \
|
||||
--owners 136693071363 \
|
||||
--query "sort_by(Images, &CreationDate)[*].[CreationDate,Name,ImageId]" \
|
||||
--filters "Name=name,Values=debian-10-amd64-*"
|
||||
|
||||
# Google Cloud Platform (GCP)
|
||||
gcloud compute images list --filter debian-10-buster-v
|
||||
|
||||
# Microsoft Azure
|
||||
az vm image list --all --output table \
|
||||
--publisher Debian --offer debian-10 --sku 10-gen2
|
||||
```
|
||||
|
||||
### Debian 11 (Bullseye)
|
||||
|
|
@ -106,10 +109,18 @@ Debian 11 is based on Kernel version **5.10** which has no known major Kernel bu
|
|||
Available images can be listed using:
|
||||
|
||||
```bash
|
||||
# Amazon Web Services (AWS)
|
||||
aws ec2 describe-images --region us-east-1 --output table \
|
||||
--owners 136693071363 \
|
||||
--query "sort_by(Images, &CreationDate)[*].[CreationDate,Name,ImageId]" \
|
||||
--filters "Name=name,Values=debian-11-amd64-*"
|
||||
|
||||
# Google Cloud Platform (GCP)
|
||||
gcloud compute images list --filter debian-11-bullseye-v
|
||||
|
||||
# Microsoft Azure
|
||||
az vm image list --all --output table \
|
||||
--publisher Debian --offer debian-11 --sku 11-gen2
|
||||
```
|
||||
|
||||
### Flatcar
|
||||
|
|
|
|||
|
|
@ -194,6 +194,8 @@ using preemptible/spot instances you might be waiting for a long time.
|
|||
|
||||
## Fetching images via AWS SSM (AWS Only)
|
||||
|
||||
{{ kops_feature_table(kops_added_default='1.25.3') }}
|
||||
|
||||
If you are using AWS, you can dynamically fetch instance group images from an AWS SSM Parameter. kOps will automatically fetch SSM Parameter and lookup the AMI ID on every `kops update cluster` run. This is useful if you often update your images and don't want to update your instance group configuration every time. Your SSM Parameter must start with `ssm:` and contain the full path of the SSM Parameter.
|
||||
|
||||
An example spec looks like this:
|
||||
|
|
|
|||
Loading…
Reference in New Issue