Created
December 12, 2023 11:02
-
-
Save filipeandre/fd370031c95a3f864a5dd0d15f3283ac to your computer and use it in GitHub Desktop.
Ec2 profile that installs docker on EKS nodes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AWSTemplateFormatVersion: '2010-09-09' | |
Resources: | |
EksWithDockerLaunchTemplate: | |
Type: AWS::EC2::LaunchTemplate | |
Properties: | |
LaunchTemplateName: EksWithDocker | |
VersionDescription: Initial version | |
LaunchTemplateData: | |
# MetadataOptions: | |
# HttpTokens: required | |
UserData: !Base64 | |
#!/bin/bash | |
# Install Docker | |
sudo yum update -y | |
sudo amazon-linux-extras install docker -y | |
sudo usermod -aG docker ec2-user | |
sudo systemctl enable /usr/lib/systemd/system/docker.service | |
sudo service docker start | |
Outputs: | |
LaunchTemplateName: | |
Value: !Ref EksWithDockerLaunchTemplate | |
Description: Name of the created EC2 Launch Template |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment