{"id":15896,"date":"2021-03-12T09:54:47","date_gmt":"2021-03-12T08:54:47","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/deploying-a-kubernetes-cluster-on-ec-with-rancher\/"},"modified":"2021-03-12T09:54:47","modified_gmt":"2021-03-12T08:54:47","slug":"deploying-a-kubernetes-cluster-on-ec-with-rancher","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/deploying-a-kubernetes-cluster-on-ec-with-rancher\/","title":{"rendered":"Deploying a Kubernetes cluster on EC2 with Rancher"},"content":{"rendered":"<p>Once Rancher is up and running, it makes the deployment and management of Kubernetes clusters quite easy. In this post we&#8217;ll deploy a brand new cluster on top of <a href=\"https:\/\/aws.amazon.com\/ec2\/\" target=\"_blank\" rel=\"noopener\">EC2<\/a>. If you want to have a simple and quick Rancher playground you can follow <a href=\"https:\/\/www.dbi-services.com\/blog\/rancher-on-sles-15-as-a-demo-environment\/\" target=\"_blank\" rel=\"noopener\">this post<\/a>, which will give you a Rancher setup on <a href=\"https:\/\/www.suse.com\/products\/server\/\" target=\"_blank\" rel=\"noopener\">SLES 15<\/a>. If you want to have a more production like Rancher setup, you can follow these posts: <a href=\"https:\/\/www.dbi-services.com\/blog\/rancher-up-and-running-on-ec2-1-one-node\/\" target=\"_blank\" rel=\"noopener\">Rancher, up and running, on EC2 \u2013 1 \u2013 One node<\/a>, <a href=\"https:\/\/www.dbi-services.com\/blog\/rancher-up-and-running-on-ec2-2-three-nodes\/\" target=\"_blank\" rel=\"noopener\">Rancher, up and running, on EC2 \u2013 2 \u2013 Three nodes<\/a> and <a href=\"https:\/\/www.dbi-services.com\/blog\/rancher-up-and-running-on-ec2-3-rancher-setup\/\" target=\"_blank\" rel=\"noopener\">Rancher, up and running, on EC2 \u2013 3 \u2013 Rancher setup<\/a>. Those will give you a three nodes cluster on top of EC2, running on <a href=\"https:\/\/www.debian.org\/\" target=\"_blank\" rel=\"noopener\">Debian<\/a>.<\/p>\n<p><!--more--><\/p>\n<p>Before you start with this, make sure, that you meet these requirements:<\/p>\n<ul>\n<li>The host on which you run Rancher needs to communicate with all instances you deploy on EC2, in both directions. If you have Rancher running locally this will only work if the EC2 instances will be able to reach your local Rancher installation.<\/li>\n<li>You need to setup the correct IAM policies and groups. If you don&#8217;t get this right you will not be able to deploy the cluster.<\/li>\n<\/ul>\n<p>Because this is the most important point, lets start with the IAM policies. I&#8217;ve created three of them:<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_1.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_1.jpg\" alt=\"\" width=\"1020\" height=\"254\" class=\"aligncenter size-full wp-image-48270\" \/><\/a><\/p>\n<ul>\n<li>dwe-rancher-controlpane-policy: This is the policy that will be used for the control pane<\/li>\n<li>dwe-rancher-etcd-worker-policy: This is the policy that will be used for the etcd and worker nodes<\/li>\n<li>dwe-rancher-passrole-policy: This is the policy that will be attached to the AWS user that will be registered in Rancher with the cloud credentials<\/li>\n<\/ul>\n<p>Here is the dwe-rancher-controlpane-policy (replace [YOUR_AWS_ACCOUNT_ID] with your AWS account ID):<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\n{\n    \"Version\": \"2012-10-17\",\n    \"Statement\": [\n        {\n            \"Sid\": \"VisualEditor0\",\n            \"Effect\": \"Allow\",\n            \"Action\": [\n                \"ec2:AttachVolume\",\n                \"ec2:AuthorizeSecurityGroupIngress\",\n                \"ec2:DescribeInstances\",\n                \"autoscaling:DescribeLaunchConfigurations\",\n                \"ec2:DescribeRegions\",\n                \"elasticloadbalancing:DescribeLoadBalancerPolicyTypes\",\n                \"elasticloadbalancing:SetWebAcl\",\n                \"elasticloadbalancing:DescribeLoadBalancers\",\n                \"ec2:DeleteVolume\",\n                \"elasticloadbalancing:DescribeListeners\",\n                \"autoscaling:DescribeAutoScalingGroups\",\n                \"ec2:CreateRoute\",\n                \"ec2:CreateSecurityGroup\",\n                \"ec2:DescribeVolumes\",\n                \"elasticloadbalancing:DescribeLoadBalancerPolicies\",\n                \"kms:DescribeKey\",\n                \"elasticloadbalancing:DescribeListenerCertificates\",\n                \"elasticloadbalancing:DescribeInstanceHealth\",\n                \"ec2:ModifyInstanceAttribute\",\n                \"ec2:DescribeRouteTables\",\n                \"elasticloadbalancing:DescribeSSLPolicies\",\n                \"ec2:DetachVolume\",\n                \"ec2:ModifyVolume\",\n                \"ec2:CreateTags\",\n                \"autoscaling:DescribeTags\",\n                \"ec2:DeleteRoute\",\n                \"elasticloadbalancing:*\",\n                \"ec2:DescribeSecurityGroups\",\n                \"ec2:CreateVolume\",\n                \"elasticloadbalancing:DescribeLoadBalancerAttributes\",\n                \"ec2:RevokeSecurityGroupIngress\",\n                \"iam:CreateServiceLinkedRole\",\n                \"elasticloadbalancing:DescribeTargetGroupAttributes\",\n                \"ec2:DescribeVpcs\",\n                \"elasticloadbalancing:DescribeAccountLimits\",\n                \"ec2:DeleteSecurityGroup\",\n                \"elasticloadbalancing:DescribeTargetHealth\",\n                \"elasticloadbalancing:DescribeTargetGroups\",\n                \"elasticloadbalancing:DescribeRules\",\n                \"ec2:DescribeSubnets\"\n            ],\n            \"Resource\": \"*\"\n        },\n        {\n            \"Sid\": \"VisualEditor1\",\n            \"Effect\": \"Allow\",\n            \"Action\": \"elasticloadbalancing:*\",\n            \"Resource\": \"*\"\n        },\n        {\n            \"Sid\": \"VisualEditor2\",\n            \"Effect\": \"Allow\",\n            \"Action\": \"elasticloadbalancing:*\",\n            \"Resource\": \"arn:aws:elasticloadbalancing:*:[YOUR_AWS_ACCOUNT_ID]:loadbalancer\/*\"\n        },\n        {\n            \"Sid\": \"VisualEditor3\",\n            \"Effect\": \"Allow\",\n            \"Action\": \"elasticloadbalancing:*\",\n            \"Resource\": [\n                \"arn:aws:elasticloadbalancing:*:[YOUR_AWS_ACCOUNT_ID]:targetgroup\/*\/*\",\n                \"arn:aws:elasticloadbalancing:*:[YOUR_AWS_ACCOUNT_ID]:listener-rule\/app\/*\/*\/*\/*\",\n                \"arn:aws:elasticloadbalancing:*:[YOUR_AWS_ACCOUNT_ID]:listener-rule\/net\/*\/*\/*\/*\",\n                \"arn:aws:elasticloadbalancing:*:[YOUR_AWS_ACCOUNT_ID]:listener\/net\/*\/*\/*\",\n                \"arn:aws:elasticloadbalancing:*:[YOUR_AWS_ACCOUNT_ID]:listener\/app\/*\/*\/*\",\n                \"arn:aws:elasticloadbalancing:*:[YOUR_AWS_ACCOUNT_ID]:loadbalancer\/net\/*\/*\",\n                \"arn:aws:elasticloadbalancing:*:[YOUR_AWS_ACCOUNT_ID]:loadbalancer\/app\/*\/*\"\n            ]\n        },\n        {\n            \"Sid\": \"VisualEditor4\",\n            \"Effect\": \"Allow\",\n            \"Action\": \"elasticloadbalancing:*\",\n            \"Resource\": [\n                \"arn:aws:elasticloadbalancing:*:[YOUR_AWS_ACCOUNT_ID]:targetgroup\/*\/*\",\n                \"arn:aws:elasticloadbalancing:*:[YOUR_AWS_ACCOUNT_ID]:listener-rule\/app\/*\/*\/*\/*\",\n                \"arn:aws:elasticloadbalancing:*:[YOUR_AWS_ACCOUNT_ID]:listener-rule\/net\/*\/*\/*\/*\",\n                \"arn:aws:elasticloadbalancing:*:[YOUR_AWS_ACCOUNT_ID]:listener\/net\/*\/*\/*\",\n                \"arn:aws:elasticloadbalancing:*:[YOUR_AWS_ACCOUNT_ID]:listener\/app\/*\/*\/*\",\n                \"arn:aws:elasticloadbalancing:*:[YOUR_AWS_ACCOUNT_ID]:loadbalancer\/net\/*\/*\",\n                \"arn:aws:elasticloadbalancing:*:[YOUR_AWS_ACCOUNT_ID]:loadbalancer\/app\/*\/*\"\n            ]\n        },\n        {\n            \"Sid\": \"VisualEditor5\",\n            \"Effect\": \"Allow\",\n            \"Action\": \"elasticloadbalancing:*\",\n            \"Resource\": [\n                \"arn:aws:elasticloadbalancing:*:[YOUR_AWS_ACCOUNT_ID]:loadbalancer\/app\/*\/*\",\n                \"arn:aws:elasticloadbalancing:*:[YOUR_AWS_ACCOUNT_ID]:loadbalancer\/net\/*\/*\",\n                \"arn:aws:elasticloadbalancing:*:[YOUR_AWS_ACCOUNT_ID]:targetgroup\/*\/*\",\n                \"arn:aws:elasticloadbalancing:*:[YOUR_AWS_ACCOUNT_ID]:listener-rule\/app\/*\/*\/*\/*\",\n                \"arn:aws:elasticloadbalancing:*:[YOUR_AWS_ACCOUNT_ID]:listener-rule\/net\/*\/*\/*\/*\",\n                \"arn:aws:elasticloadbalancing:*:[YOUR_AWS_ACCOUNT_ID]:listener\/net\/*\/*\/*\",\n                \"arn:aws:elasticloadbalancing:*:[YOUR_AWS_ACCOUNT_ID]:listener\/app\/*\/*\/*\"\n            ]\n        }\n    ]\n}\n<\/pre>\n<p>Here is the dwe-rancher-etcd-worker-policy (replace [YOUR_AWS_ACCOUNT_ID] with your AWS account ID):<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\n{\n    \"Version\": \"2012-10-17\",\n    \"Statement\": [\n        {\n            \"Sid\": \"VisualEditor0\",\n            \"Effect\": \"Allow\",\n            \"Action\": \"ec2:*\",\n            \"Resource\": \"*\"\n        },\n        {\n            \"Sid\": \"VisualEditor1\",\n            \"Effect\": \"Allow\",\n            \"Action\": \"secretsmanager:*\",\n            \"Resource\": \"arn:aws:secretsmanager:*:[YOUR_AWS_ACCOUNT_ID]:secret:*\"\n        }\n    ]\n}\n<\/pre>\n<p>Finally, here is the content of dwe-rancher-passrole-policy (here you need to reference the other two policies):<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\n{\n    \"Version\": \"2012-10-17\",\n    \"Statement\": [\n        {\n            \"Sid\": \"VisualEditor0\",\n            \"Effect\": \"Allow\",\n            \"Action\": [\n                \"ec2:ModifyInstanceMetadataOptions\",\n                \"ec2:AuthorizeSecurityGroupIngress\",\n                \"ec2:Describe*\",\n                \"ec2:ImportKeyPair\",\n                \"ec2:CreateKeyPair\",\n                \"ec2:CreateSecurityGroup\",\n                \"ec2:CreateTags\",\n                \"eks:*\",\n                \"ec2:DeleteKeyPair\"\n            ],\n            \"Resource\": \"*\"\n        },\n        {\n            \"Sid\": \"VisualEditor1\",\n            \"Effect\": \"Allow\",\n            \"Action\": \"ec2:RunInstances\",\n            \"Resource\": [\n                \"arn:aws:ec2:eu-central-1::image\/ami-*\",\n                \"arn:aws:ec2:eu-central-1:[YOUR_AWS_ACCOUNT_ID]:security-group\/*\",\n                \"arn:aws:ec2:eu-central-1:[YOUR_AWS_ACCOUNT_ID]:subnet\/*\",\n                \"arn:aws:ec2:eu-central-1:[YOUR_AWS_ACCOUNT_ID]:network-interface\/*\",\n                \"arn:aws:iam::[YOUR_AWS_ACCOUNT_ID]:role\/dwe-rancher-controlpane-role\",\n                \"arn:aws:iam::[YOUR_AWS_ACCOUNT_ID]:role\/dwe-rancher-etcd-worker-role\",\n                \"arn:aws:ec2:eu-central-1:[YOUR_AWS_ACCOUNT_ID]:instance\/*\",\n                \"arn:aws:ec2:eu-central-1:[YOUR_AWS_ACCOUNT_ID]:volume\/*\",\n                \"arn:aws:ec2:eu-central-1:[YOUR_AWS_ACCOUNT_ID]:placement-group\/*\",\n                \"arn:aws:ec2:eu-central-1:[YOUR_AWS_ACCOUNT_ID]:key-pair\/*\"\n            ]\n        },\n        {\n            \"Sid\": \"VisualEditor2\",\n            \"Effect\": \"Allow\",\n            \"Action\": [\n                \"ec2:RebootInstances\",\n                \"ec2:TerminateInstances\",\n                \"ec2:StartInstances\",\n                \"ec2:StopInstances\"\n            ],\n            \"Resource\": \"arn:aws:ec2:eu-central-1:[YOUR_AWS_ACCOUNT_ID]:instance\/*\"\n        },\n        {\n            \"Sid\": \"VisualEditor3\",\n            \"Effect\": \"Allow\",\n            \"Action\": \"iam:PassRole\",\n            \"Resource\": [\n                \"arn:aws:iam::[YOUR_AWS_ACCOUNT_ID]:role\/dwe-rancher-controlpane-role\",\n                \"arn:aws:iam::[YOUR_AWS_ACCOUNT_ID]:role\/dwe-rancher-etcd-worker-role\"\n            ]\n        }\n    ]\n}\n<\/pre>\n<p>Once you have that ready, create two IAM roles with the same name as the policies you created above. This is required, because you need to specify those later when you setup the node templates in Rancher:<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_2.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_2.jpg\" alt=\"\" width=\"1263\" height=\"120\" class=\"aligncenter size-full wp-image-48273\" \/><\/a><\/p>\n<p>The final step for the permissions in AWS is to assign the last policy as a permission to the AWS user you will be using for deploying the cluster:<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_3.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_3.jpg\" alt=\"\" width=\"932\" height=\"572\" class=\"aligncenter size-full wp-image-48274\" \/><\/a><\/p>\n<p>As Rancher needs to communicate with AWS you need to create your credentials:<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_4.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_4.jpg\" alt=\"\" width=\"1200\" height=\"296\" class=\"aligncenter size-full wp-image-48275\" \/><\/a><br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_5.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_5.jpg\" alt=\"\" width=\"1200\" height=\"257\" class=\"aligncenter size-full wp-image-48276\" \/><\/a><\/p>\n<p>Here you need to provide your AWS access key and the secret:<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_6.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_6.jpg\" alt=\"\" width=\"997\" height=\"450\" class=\"aligncenter size-full wp-image-48277\" \/><\/a><\/p>\n<p>If you do not know, how to get the access key and the secret, you can generate that in the IAM console for your AWS user:<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_7.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_7.jpg\" alt=\"\" width=\"1200\" height=\"415\" class=\"aligncenter size-full wp-image-48278\" \/><\/a><\/p>\n<p>The next piece to get in place are the &#8220;node templates&#8221;. These templates describe which <a href=\"https:\/\/aws.amazon.com\/ec2\/instance-types\/\" target=\"_blank\" rel=\"noopener\">EC2 instance types<\/a> you want to use, which <a href=\"https:\/\/aws.amazon.com\/about-aws\/global-infrastructure\/regions_az\/\" target=\"_blank\" rel=\"noopener\">AWS region<\/a> to go for and a few other properties that describe your nodes:<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_8.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_8.jpg\" alt=\"\" width=\"1200\" height=\"301\" class=\"aligncenter size-full wp-image-48279\" \/><\/a><br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_9.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_9.jpg\" alt=\"\" width=\"1200\" height=\"272\" class=\"aligncenter size-full wp-image-48280\" \/><\/a><\/p>\n<p>Here you need to reference the cloud credentials you&#8217;ve created above:<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_10.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_10.jpg\" alt=\"\" width=\"1200\" height=\"562\" class=\"aligncenter size-full wp-image-48281\" \/><\/a><\/p>\n<p>Your <a href=\"https:\/\/aws.amazon.com\/vpc\/\" target=\"_blank\" rel=\"noopener\">VPC<\/a> and Subnets are should be configured in AWS as you need to specify those in the next step:<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_11.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_11.jpg\" alt=\"\" width=\"1427\" height=\"718\" class=\"aligncenter size-full wp-image-48282\" \/><\/a><\/p>\n<p>You can either let Rancher create a security group for you, or you can use an existing one:<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_12.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_12.jpg\" alt=\"\" width=\"1200\" height=\"219\" class=\"aligncenter size-full wp-image-48283\" \/><\/a><\/p>\n<p>Be careful if you let Rancher do it, as the security group that gets created in the background is quite open and you should _not_ do it like this:<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_13.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_13.jpg\" alt=\"\" width=\"1200\" height=\"526\" class=\"aligncenter size-full wp-image-48284\" \/><\/a><\/p>\n<p>This is the most important section: The AMI ID you see, is the latest Ubuntu 20.04 AMI. The user for that AMI is &#8220;ubuntu&#8221;. If you want to go with a Debian, CentOS or whatever AMI you need to adjust those (The user for Debian would be &#8220;admin&#8221;, for CentOS it would be &#8220;centos&#8221; ). The &#8220;IAM instance profile name&#8221; is the role you created above, and this is important. Here you see &#8220;dwe-rancher-controlpane-role&#8221; because this will be the node template for the controller pane:<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_14.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_14.jpg\" alt=\"\" width=\"1200\" height=\"523\" class=\"aligncenter size-full wp-image-48285\" \/><\/a><\/p>\n<p>Give your template a name and stick to the dedaults for the rest:<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_16.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_16.jpg\" alt=\"\" width=\"1200\" height=\"281\" class=\"aligncenter size-full wp-image-48286\" \/><\/a><br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_17.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_17.jpg\" alt=\"\" width=\"1200\" height=\"232\" class=\"aligncenter size-full wp-image-48287\" \/><\/a><\/p>\n<p>Create a nother node template in exactly the same way as the last one. The only difference is the name and the &#8220;IAM instance profile name&#8221;, which is now the one for the etcd and the worker nodes:<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_18.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_18.jpg\" alt=\"\" width=\"1200\" height=\"478\" class=\"aligncenter size-full wp-image-48288\" \/><\/a><br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_19.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_19.jpg\" alt=\"\" width=\"1200\" height=\"293\" class=\"aligncenter size-full wp-image-48289\" \/><\/a><\/p>\n<p>Now we are ready to deploy a brand new Kubernetes cluster on top of EC2:<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_20.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_20.jpg\" alt=\"\" width=\"1200\" height=\"248\" class=\"aligncenter size-full wp-image-48291\" \/><\/a><br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_21.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_21.jpg\" alt=\"\" width=\"1200\" height=\"675\" class=\"aligncenter size-full wp-image-48292\" \/><\/a><\/p>\n<p>Here you reference the node templates. Make sure you use the control pane template for the control pane, and the other templates for etcd and worker nodes:<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_22.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_22.jpg\" alt=\"\" width=\"1200\" height=\"408\" class=\"aligncenter size-full wp-image-48293\" \/><\/a><\/p>\n<p>Go with the default and select &#8220;AWS&#8221; as cloud provider:<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_23.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_23.jpg\" alt=\"\" width=\"1200\" height=\"712\" class=\"aligncenter size-full wp-image-48294\" \/><\/a><br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_24.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_24.jpg\" alt=\"\" width=\"1200\" height=\"210\" class=\"aligncenter size-full wp-image-48295\" \/><\/a><\/p>\n<p>Before you press &#8220;Create&#8221;, it is a good idea to log into your Rancher host and tail the logs of the Rancher container. If anything goes wrong it shows up there:<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1; highlight: [1,3]\">\nadmin@ip-10-0-1-69:~$ docker ps\nCONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS                                      NAMES\n82a08d1aba46        rancher\/rancher     \"entrypoint.sh\"     3 hours ago         Up 3 hours          0.0.0.0:80-&gt;80\/tcp, 0.0.0.0:443-&gt;443\/tcp   infallible_hugle\nadmin@ip-10-0-1-69:~$ docker logs 82a08d1aba46 -f\n2021\/03\/12 06:24:20 [INFO] Rancher version v2.5.6 (65f7c8442) is starting\n2021\/03\/12 06:24:20 [INFO] Rancher arguments {ACMEDomains:[] AddLocal:true Embedded:false BindHost: HTTPListenPort:80 HTTPSListenPort:443 K8sMode:auto Debug:false Trace:false NoCACerts:false AuditLogPath:\/var\/log\/auditlog\/rancher-api-audit.log AuditLogMaxage:10 AuditLogMaxsize:100 AuditLogMaxbackup:10 AuditLevel:0 Agent:false Features:}\n2021\/03\/12 06:24:20 [INFO] Listening on \/tmp\/log.sock\n<\/pre>\n<p>Once you started the cluster creation, you can also monitor the EC2 console and watch the EC instances coming up:<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_25.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_25.jpg\" alt=\"\" width=\"1200\" height=\"335\" class=\"aligncenter size-full wp-image-48296\" \/><\/a><br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_26.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_26.jpg\" alt=\"\" width=\"1200\" height=\"151\" class=\"aligncenter size-full wp-image-48297\" \/><\/a><br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_27.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_27.jpg\" alt=\"\" width=\"1200\" height=\"140\" class=\"aligncenter size-full wp-image-48298\" \/><\/a><\/p>\n<p>Have a look at the main cluster screen and you should see the status changing several times until the cluster is fully provisioned:<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_28.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_28.jpg\" alt=\"\" width=\"1200\" height=\"230\" class=\"aligncenter size-full wp-image-48299\" \/><\/a><br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_29.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_29.jpg\" alt=\"\" width=\"1200\" height=\"255\" class=\"aligncenter size-full wp-image-48300\" \/><\/a><br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_30.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_30.jpg\" alt=\"\" width=\"1200\" height=\"236\" class=\"aligncenter size-full wp-image-48301\" \/><\/a><br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_31.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_31.jpg\" alt=\"\" width=\"1200\" height=\"235\" class=\"aligncenter size-full wp-image-48302\" \/><\/a><br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_32.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_32.jpg\" alt=\"\" width=\"1200\" height=\"239\" class=\"aligncenter size-full wp-image-48303\" \/><\/a><br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_33.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_33.jpg\" alt=\"\" width=\"1200\" height=\"244\" class=\"aligncenter size-full wp-image-48304\" \/><\/a><br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_34.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_34.jpg\" alt=\"\" width=\"1200\" height=\"223\" class=\"aligncenter size-full wp-image-48305\" \/><\/a><br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_35.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_35.jpg\" alt=\"\" width=\"1200\" height=\"226\" class=\"aligncenter size-full wp-image-48306\" \/><\/a><br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_36.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_36.jpg\" alt=\"\" width=\"1200\" height=\"232\" class=\"aligncenter size-full wp-image-48307\" \/><\/a><\/p>\n<p>The cluster is fully ready and you can drill into the cluster section:<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_37.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/rancher_ec2_37.jpg\" alt=\"\" width=\"1200\" height=\"692\" class=\"aligncenter size-full wp-image-48309\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Once Rancher is up and running, it makes the deployment and management of Kubernetes clusters quite easy. In this post we&#8217;ll deploy a brand new cluster on top of EC2. If you want to have a simple and quick Rancher playground you can follow this post, which will give you a Rancher setup on SLES [&hellip;]<\/p>\n","protected":false},"author":29,"featured_media":15933,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1865,955,1320,1504,1522],"tags":[1883,89,2276,309],"type_dbi":[],"class_list":["post-15896","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-aws","category-cloud","category-devops","category-docker","category-kubernetes","tag-ec2","tag-kubernetes","tag-rancher","tag-suse"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Deploying a Kubernetes cluster on EC2 with Rancher - dbi Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/deploying-a-kubernetes-cluster-on-ec-with-rancher\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Deploying a Kubernetes cluster on EC2 with Rancher\" \/>\n<meta property=\"og:description\" content=\"Once Rancher is up and running, it makes the deployment and management of Kubernetes clusters quite easy. In this post we&#8217;ll deploy a brand new cluster on top of EC2. If you want to have a simple and quick Rancher playground you can follow this post, which will give you a Rancher setup on SLES [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/deploying-a-kubernetes-cluster-on-ec-with-rancher\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2021-03-12T08:54:47+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/ec2rancher1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1400\" \/>\n\t<meta property=\"og:image:height\" content=\"374\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Daniel Westermann\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@westermanndanie\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Daniel Westermann\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/deploying-a-kubernetes-cluster-on-ec-with-rancher\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/deploying-a-kubernetes-cluster-on-ec-with-rancher\\\/\"},\"author\":{\"name\":\"Daniel Westermann\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/8d08e9bd996a89bd75c0286cbabf3c66\"},\"headline\":\"Deploying a Kubernetes cluster on EC2 with Rancher\",\"datePublished\":\"2021-03-12T08:54:47+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/deploying-a-kubernetes-cluster-on-ec-with-rancher\\\/\"},\"wordCount\":821,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/deploying-a-kubernetes-cluster-on-ec-with-rancher\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2022\\\/04\\\/ec2rancher1.png\",\"keywords\":[\"EC2\",\"kubernetes\",\"Rancher\",\"SuSE\"],\"articleSection\":[\"AWS\",\"Cloud\",\"DevOps\",\"Docker\",\"Kubernetes\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/deploying-a-kubernetes-cluster-on-ec-with-rancher\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/deploying-a-kubernetes-cluster-on-ec-with-rancher\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/deploying-a-kubernetes-cluster-on-ec-with-rancher\\\/\",\"name\":\"Deploying a Kubernetes cluster on EC2 with Rancher - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/deploying-a-kubernetes-cluster-on-ec-with-rancher\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/deploying-a-kubernetes-cluster-on-ec-with-rancher\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2022\\\/04\\\/ec2rancher1.png\",\"datePublished\":\"2021-03-12T08:54:47+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/8d08e9bd996a89bd75c0286cbabf3c66\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/deploying-a-kubernetes-cluster-on-ec-with-rancher\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/deploying-a-kubernetes-cluster-on-ec-with-rancher\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/deploying-a-kubernetes-cluster-on-ec-with-rancher\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2022\\\/04\\\/ec2rancher1.png\",\"contentUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2022\\\/04\\\/ec2rancher1.png\",\"width\":1400,\"height\":374},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/deploying-a-kubernetes-cluster-on-ec-with-rancher\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Deploying a Kubernetes cluster on EC2 with Rancher\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/8d08e9bd996a89bd75c0286cbabf3c66\",\"name\":\"Daniel Westermann\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/31350ceeecb1dd8986339a29bf040d4cd3cd087d410deccd8f55234466d6c317?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/31350ceeecb1dd8986339a29bf040d4cd3cd087d410deccd8f55234466d6c317?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/31350ceeecb1dd8986339a29bf040d4cd3cd087d410deccd8f55234466d6c317?s=96&d=mm&r=g\",\"caption\":\"Daniel Westermann\"},\"description\":\"Daniel Westermann is Principal Consultant and Technology Leader Open Infrastructure at dbi services. He has more than 15 years of experience in management, engineering and optimization of databases and infrastructures, especially on Oracle and PostgreSQL. Since the beginning of his career, he has specialized in Oracle Technologies and is Oracle Certified Professional 12c and Oracle Certified Expert RAC\\\/GridInfra. Over time, Daniel has become increasingly interested in open source technologies, becoming \u201cTechnology Leader Open Infrastructure\u201d and PostgreSQL expert. \u00a0Based on community or EnterpriseDB tools, he develops and installs complex high available solutions with PostgreSQL. He is also a certified PostgreSQL Plus 9.0 Professional and a Postgres Advanced Server 9.4 Professional. He is a regular speaker at PostgreSQL conferences in Switzerland and Europe. Today Daniel is also supporting our customers on AWS services such as AWS RDS, database migrations into the cloud, EC2 and automated infrastructure management with AWS SSM (System Manager). He is a certified AWS Solutions Architect Professional. Prior to dbi services, Daniel was Management System Engineer at LC SYSTEMS-Engineering AG in Basel. Before that, he worked as Oracle Developper &amp;\u00a0Project Manager at Delta Energy Solutions AG in Basel (today Powel AG). Daniel holds a diploma in Business Informatics (DHBW, Germany). His branch-related experience mainly covers the pharma industry, the financial sector, energy, lottery and telecommunications.\",\"sameAs\":[\"https:\\\/\\\/x.com\\\/westermanndanie\"],\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/author\\\/daniel-westermann\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Deploying a Kubernetes cluster on EC2 with Rancher - dbi Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/deploying-a-kubernetes-cluster-on-ec-with-rancher\/","og_locale":"en_US","og_type":"article","og_title":"Deploying a Kubernetes cluster on EC2 with Rancher","og_description":"Once Rancher is up and running, it makes the deployment and management of Kubernetes clusters quite easy. In this post we&#8217;ll deploy a brand new cluster on top of EC2. If you want to have a simple and quick Rancher playground you can follow this post, which will give you a Rancher setup on SLES [&hellip;]","og_url":"https:\/\/www.dbi-services.com\/blog\/deploying-a-kubernetes-cluster-on-ec-with-rancher\/","og_site_name":"dbi Blog","article_published_time":"2021-03-12T08:54:47+00:00","og_image":[{"width":1400,"height":374,"url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/ec2rancher1.png","type":"image\/png"}],"author":"Daniel Westermann","twitter_card":"summary_large_image","twitter_creator":"@westermanndanie","twitter_misc":{"Written by":"Daniel Westermann","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/deploying-a-kubernetes-cluster-on-ec-with-rancher\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/deploying-a-kubernetes-cluster-on-ec-with-rancher\/"},"author":{"name":"Daniel Westermann","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d08e9bd996a89bd75c0286cbabf3c66"},"headline":"Deploying a Kubernetes cluster on EC2 with Rancher","datePublished":"2021-03-12T08:54:47+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/deploying-a-kubernetes-cluster-on-ec-with-rancher\/"},"wordCount":821,"commentCount":0,"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/deploying-a-kubernetes-cluster-on-ec-with-rancher\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/ec2rancher1.png","keywords":["EC2","kubernetes","Rancher","SuSE"],"articleSection":["AWS","Cloud","DevOps","Docker","Kubernetes"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/deploying-a-kubernetes-cluster-on-ec-with-rancher\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/deploying-a-kubernetes-cluster-on-ec-with-rancher\/","url":"https:\/\/www.dbi-services.com\/blog\/deploying-a-kubernetes-cluster-on-ec-with-rancher\/","name":"Deploying a Kubernetes cluster on EC2 with Rancher - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/deploying-a-kubernetes-cluster-on-ec-with-rancher\/#primaryimage"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/deploying-a-kubernetes-cluster-on-ec-with-rancher\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/ec2rancher1.png","datePublished":"2021-03-12T08:54:47+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d08e9bd996a89bd75c0286cbabf3c66"},"breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/deploying-a-kubernetes-cluster-on-ec-with-rancher\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/deploying-a-kubernetes-cluster-on-ec-with-rancher\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/deploying-a-kubernetes-cluster-on-ec-with-rancher\/#primaryimage","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/ec2rancher1.png","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/ec2rancher1.png","width":1400,"height":374},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/deploying-a-kubernetes-cluster-on-ec-with-rancher\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Deploying a Kubernetes cluster on EC2 with Rancher"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d08e9bd996a89bd75c0286cbabf3c66","name":"Daniel Westermann","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/31350ceeecb1dd8986339a29bf040d4cd3cd087d410deccd8f55234466d6c317?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/31350ceeecb1dd8986339a29bf040d4cd3cd087d410deccd8f55234466d6c317?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/31350ceeecb1dd8986339a29bf040d4cd3cd087d410deccd8f55234466d6c317?s=96&d=mm&r=g","caption":"Daniel Westermann"},"description":"Daniel Westermann is Principal Consultant and Technology Leader Open Infrastructure at dbi services. He has more than 15 years of experience in management, engineering and optimization of databases and infrastructures, especially on Oracle and PostgreSQL. Since the beginning of his career, he has specialized in Oracle Technologies and is Oracle Certified Professional 12c and Oracle Certified Expert RAC\/GridInfra. Over time, Daniel has become increasingly interested in open source technologies, becoming \u201cTechnology Leader Open Infrastructure\u201d and PostgreSQL expert. \u00a0Based on community or EnterpriseDB tools, he develops and installs complex high available solutions with PostgreSQL. He is also a certified PostgreSQL Plus 9.0 Professional and a Postgres Advanced Server 9.4 Professional. He is a regular speaker at PostgreSQL conferences in Switzerland and Europe. Today Daniel is also supporting our customers on AWS services such as AWS RDS, database migrations into the cloud, EC2 and automated infrastructure management with AWS SSM (System Manager). He is a certified AWS Solutions Architect Professional. Prior to dbi services, Daniel was Management System Engineer at LC SYSTEMS-Engineering AG in Basel. Before that, he worked as Oracle Developper &amp;\u00a0Project Manager at Delta Energy Solutions AG in Basel (today Powel AG). Daniel holds a diploma in Business Informatics (DHBW, Germany). His branch-related experience mainly covers the pharma industry, the financial sector, energy, lottery and telecommunications.","sameAs":["https:\/\/x.com\/westermanndanie"],"url":"https:\/\/www.dbi-services.com\/blog\/author\/daniel-westermann\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/15896","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/29"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=15896"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/15896\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media\/15933"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=15896"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=15896"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=15896"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=15896"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}