Why does OpenShift 4.x IPI installation fails on AWS with IMDSv2 SCP enforcement: "UnauthorizedOperation: ec2:RunInstances"?
Issue
-
When attempting to install an
OpenShift 4.x
cluster onAWS
using theIPI
method, the installation fails with the followingerror
:failed to create AWSMachine instance: failed to run instance: UnauthorizedOperation: You are not authorized to perform this operation. is not authorized to perform: ec2:RunInstances on resource: arn:aws:ec2:*:*:instance /* with an explicit deny in a service control policy.
- How to
enforce IMDSv2
in AWS while installing anOpenShift 4.x
cluster onAWS
using theinstaller-provisioned infrastructure (IPI)
method? - When deploying an
OpenShift 4.x
cluster onAWS
using theIPI
method, the installation fails due to aService Control Policy (SCP)
that enforcesIMDSv2 (Instance Metadata Service v2)
; how to fix this? - How can we
configure
theinstallation
or themanifests YAML
file so that the installer creates EC2control plane
,bootstrap
, andworkers nodes
with the parameterIMDSv2 = required
? - Why does
openshift-install create cluster
fail with"UnauthorizedOperation"
andec2:RunInstances
whenIMDSv2 is enforced via SCP
?
Environment
- Red Hat® OpenShift Container Platform 4.x
- Installer-provisioned infrastructure (IPI)
- AWS Cloud Platform
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.