Skip to content

Commit 753697e

Browse files
committed
Copy Edit 3
1 parent 6497855 commit 753697e

4 files changed

Lines changed: 208 additions & 203 deletions

File tree

  • docs/guides/kubernetes
    • migrating-from-aws-eks-to-linode-kubernetes-engine-lke
    • migrating-from-azure-aks-to-linode-kubernetes-engine-lke
    • migrating-from-google-gke-to-linode-kubernetes-engine-lke
    • migrating-from-oracle-kubernetes-engine-to-linode-kubernetes-engine-lke

docs/guides/kubernetes/migrating-from-aws-eks-to-linode-kubernetes-engine-lke/index.md

Lines changed: 43 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -41,18 +41,18 @@ This guide is written for a non-root user. Commands that require elevated privil
4141

4242
![The EKS service page in the AWS Console showing the example cluster name.](aws-eks-cluster-name-console.png)
4343

44-
In the screenshot above, the cluster name is `wonderful-hideout-1734286097`. You also need to know the AWS region where your cluster resides. For this example, the region is `us-west-1` (not shown).
44+
In the screenshot above, the cluster name is `wonderful-hideout-1734286097`. You also need to know the AWS region where your cluster resides (e.g. `us-west-1`).
4545

46-
1. Use the AWS CLI to update your local `kubeconfig` file with your EKS cluster information:
46+
1. Use the AWS CLI to update your local `kubeconfig` file, replacing {{< placeholder "AWS_REGION" >}} and {{< placeholder "EKS_CLUSTER_NAME" >}} with your actual EKS cluster information:
4747

4848
```command
4949
aws eks update-kubeconfig \
50-
--region us-west-1 \
51-
--name wonderful-hideout-1734286097
50+
--region {{< placeholder "AWS_REGION" >}} \
51+
--name {{< placeholder "EKS_CLUSTER_NAME" >}}
5252
```
5353

5454
```output
55-
Added new context arn:aws:eks:us-west-1:153917289119:cluster/wonderful-hideout-1734286097 to /home/user/.kube/config
55+
Added new context arn:aws:eks:{{< placeholder "AWS_REGION" >}}:{{< placeholder "AWS_ACCOUNT_ID" >}}:cluster/{{< placeholder "EKS_CLUSTER_NAME" >}} to /home/user/.kube/config
5656
```
5757

5858
1. If your `kubeconfig` file includes multiple clusters, use the following command to list the available contexts:
@@ -64,8 +64,7 @@ This guide is written for a non-root user. Commands that require elevated privil
6464
1. Identify the context name for your EKS cluster, then set it to the active context, for example:
6565

6666
```commmand
67-
kubectl config use-context \
68-
user@wonderful-hideout-1734286097.us-west-1.eksctl.io
67+
kubectl config use-context {{< placeholder "EKS_CLUSTER_CONTEXT_NAME" >}}
6968
```
7069

7170
### Assess Your EKS Cluster
@@ -77,8 +76,8 @@ This guide is written for a non-root user. Commands that require elevated privil
7776
```
7877

7978
```output
80-
Kubernetes control plane is running at https://35057E565F73FD2804B94EF5C9D24A34.yl4.us-west-1.eks.amazonaws.com
81-
CoreDNS is running at https://35057E565F73FD2804B94EF5C9D24A34.yl4.us-west-1.eks.amazonaws.com/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
79+
Kubernetes control plane is running at {{< placeholder "EKS_CONTROL_PLANE_URL" >}}
80+
CoreDNS is running at {{< placeholder "EKS_DNS_URL" >}}
8281
8382
To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
8483
```
@@ -102,9 +101,9 @@ While Kubernetes does not have a native concept of a node group, all the nodes w
102101
```
103102

104103
```output
105-
NAME STATUS ROLES AGE VERSION
106-
ip-192-168-31-10.us-west-1.compute.internal Ready <none> 24m v1.30.7-eks-59bf375
107-
ip-192-168-36-4.us-west-1.compute.internal Ready <none> 24m v1.30.7-eks-59bf375
104+
NAME STATUS ROLES AGE VERSION
105+
{{< placeholder "EKS_NODE_1_NAME" >}} Ready <none> 24m v1.31.5-eks-5d632ec
106+
{{< placeholder "EKS_NODE_2_NAME" >}} Ready <none> 24m v1.31.5-eks-5d632ec
108107
```
109108

110109
1. Run the following command to retrieve detailed information about the first node listed:
@@ -244,30 +243,30 @@ For this guide, a [REST API service application written in Go](https://github.co
244243

245244
```output
246245
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
247-
go-quote-service LoadBalancer 10.100.215.161 a4da1d7958fa64559a460e2ae07b57e5-771162568.us-west-1.elb.amazonaws.com 80:30570/TCP 5m27s
248-
kubernetes ClusterIP 10.100.0.1 <none>
246+
go-quote-service LoadBalancer {{< placeholder "GO_QUOTE_SERVICE_CLUSTER_IP" >}} {{< placeholder "GO_QUOTE_SERVICE_EXTERNAL_HOSTNAME" >}} 80:30570/TCP 5m27s
247+
kubernetes ClusterIP {{< placeholder "KUBERNETES_CLUSTER_IP" >}} <none>
249248
```
250249

251-
1. Test the service by adding a quote:
250+
1. Test the service by adding a quote, replacing {{< placeholder "GO_QUOTE_SERVICE_EXTERNAL_HOSTNAME" >}} with the actual `EXTERNAL-IP` of your `LoadBalancer`:
252251

253252
```command
254253
curl -X POST \
255-
--data '{"quote":"This is my first quote."}' \
256-
{{< placeholder "IP_ADDRESS" >}}/quotes
254+
--data '{"quote":"This is my first quote."}' \
255+
{{< placeholder "GO_QUOTE_SERVICE_EXTERNAL_HOSTNAME" >}}/quotes
257256
```
258257

259258
1. Add a second quote:
260259

261260
```command
262261
curl -X POST \
263-
--data '{"quote":"This is my second quote."}' \
264-
{{< placeholder "IP_ADDRESS" >}}/quotes
262+
--data '{"quote":"This is my second quote."}' \
263+
{{< placeholder "GO_QUOTE_SERVICE_EXTERNAL_HOSTNAME" >}}/quotes
265264
```
266265

267266
1. Now retrieve the stored quotes:
268267

269268
```command
270-
curl {{< placeholder "IP_ADDRESS" >}}/quotes
269+
curl {{< placeholder "GO_QUOTE_SERVICE_EXTERNAL_HOSTNAME" >}}/quotes
271270
```
272271

273272
This should yield the following result:
@@ -416,16 +415,16 @@ To access your cluster, fetch the cluster credentials as a `kubeconfig` file.
416415
417416
```command
418417
CLUSTER_ID=$(linode lke clusters-list --json | \
419-
jq -r \
418+
jq -r \
420419
'.[] | select(.label == "eks-to-lke") | .id')
421420
```
422421
423422
1. Retrieve the `kubeconfig` file and save it to `~/.kube/lke-config`:.
424423
425424
```command
426425
linode lke kubeconfig-view --json "$CLUSTER_ID" | \
427-
jq -r '.[0].kubeconfig' | \
428-
base64 --decode > ~/.kube/lke-config
426+
jq -r '.[0].kubeconfig' | \
427+
base64 --decode > ~/.kube/lke-config
429428
```
430429
431430
1. After saving the `kubeconfig`, access your cluster by using `kubectl` and specifying the file:
@@ -436,7 +435,7 @@ To access your cluster, fetch the cluster credentials as a `kubeconfig` file.
436435
437436
```output
438437
NAME STATUS ROLES AGE VERSION
439-
lke289125-478490-4569f8b60000 Ready <none> 85s v1.32.0
438+
{{< placeholder "LKE_NODE_NAME" >}} Ready <none> 85s v1.32.0
440439
```
441440
442441
One node is ready, and it uses Kubernetes version 1.32.
@@ -448,8 +447,8 @@ To access your cluster, fetch the cluster credentials as a `kubeconfig` file.
448447
```
449448
450449
```output
451-
Kubernetes control plane is running at https://fa127859-38c1-4e40-971d-b5c7d5bd5e97.us-lax-2.linodelke.net:443
452-
KubeDNS is running at https://fa127859-38c1-4e40-971d-b5c7d5bd5e97.us-lax-2.linodelke.net:443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
450+
Kubernetes control plane is running at {{< placeholder "LKE_CONTROL_PLANE_URL" >}}
451+
KubeDNS is running at {{< placeholder "LKE_DNS_URL" >}}
453452
454453
To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
455454
```
@@ -470,24 +469,24 @@ Ensure that `kubectl` uses the original `kubeconfig` file with the EKS cluster c
470469
471470
```command
472471
kubectl get all \
473-
--context user@wonderful-hideout-1734286097.us-west-1.eksctl.io
472+
--context {{< placeholder "EKS_CLUSTER_CONTEXT_NAME" >}}
474473
```
475474
476475
The output shows the running pod and the one active replica set created by the deployment:
477476
478477
```output
479478
NAME READY STATUS RESTARTS AGE
480-
pod/go-quote-c575f6ccb-tls9g 1/1 Running 0 170m
479+
pod/go-quote-{{< placeholder "POD_SUFFIX" >}} 1/1 Running 0 170m
481480
482481
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
483-
service/go-quote-service LoadBalancer 10.100.215.161 a4da1d7958fa64559a460e2ae07b57e5-771162568.us-west-1.elb.amazonaws.com 80:30570/TCP 170m
484-
service/kubernetes ClusterIP 10.100.0.1 <none> 443/TCP 3h30m
482+
service/go-quote-service LoadBalancer {{< placeholder "GO_QUOTE_SERVICE_CLUSTER_IP" >}} {{< placeholder "GO_QUOTE_SERVICE_EXTERNAL_HOSTNAME" >}} 80:30570/TCP 170m
483+
service/kubernetes ClusterIP {{< placeholder "KUBERNETES_CLUSTER_IP" >}} <none> 443/TCP 3h30m
485484
486485
NAME READY UP-TO-DATE AVAILABLE AGE
487486
deployment.apps/go-quote 1/1 1 1 170m
488487
489488
NAME DESIRED CURRENT READY AGE
490-
replicaset.apps/go-quote-c575f6ccb 1 1 1 170m
489+
replicaset.apps/go-quote-{{< placeholder "REPLICASET_SUFFIX" >}} 1 1 1 170m
491490
492491
NAME REFERENCE TARGETS MINPODS MAXPODS REPLICAS AGE
493492
horizontalpodautoscaler.autoscaling/go-quote-hpa Deployment/go-quote cpu: <unknown>/50% 1 1 1 170m
@@ -558,7 +557,7 @@ Deploy your application to the newly created LKE cluster.
558557
```
559558
560559
```output
561-
lke289125-ctx
560+
{{< placeholder "LKE_CLUSTER_CONTEXT_NAME" >}}
562561
```
563562
564563
1. Apply the same `manifest.yaml` file used to deploy your application to EKS, but this time on your LKE cluster:
@@ -594,34 +593,34 @@ Verify that the deployment and the service were created successfully.
594593
kubectl get service --kubeconfig ~/.kube/lke-config
595594
```
596595
597-
The service exposes a public IP address to the REST API service (e.g. `172.235.44.28`).
596+
The service exposes a public IP address to the REST API service:
598597
599598
```output
600599
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
601-
go-quote-service LoadBalancer 10.128.183.194 172.235.44.28 80:30407/TCP 117s
602-
kubernetes ClusterIP 10.128.0.1 <none> 443/TCP 157m
600+
go-quote-service LoadBalancer {{< placeholder "GO_QUOTE_SERVICE_CLUSTER_IP" >}} {{< placeholder "GO_QUOTE_SERVICE_EXTERNAL_IP" >}} 80:30407/TCP 117s
601+
kubernetes ClusterIP {{< placeholder "KUBERNETES_CLUSTER_IP" >}} <none> 443/TCP 157m
603602
```
604603
605-
1. Test the service by adding a quote:
604+
1. Test the service by adding a quote, replacing {{< placeholder "GO_QUOTE_SERVICE_EXTERNAL_IP" >}} with the actual external IP address of your load balancer:
606605
607606
```command
608607
curl -X POST \
609608
--data '{"quote":"This is my first quote for LKE."}' \
610-
{{< placeholder "IP_ADDRESS" >}}/quotes
609+
{{< placeholder "GO_QUOTE_SERVICE_EXTERNAL_IP" >}}/quotes
611610
```
612611
613612
1. Add a second quote:
614613
615614
```command
616615
curl -X POST \
617616
--data '{"quote":"This is my second quote for LKE."}' \
618-
{{< placeholder "IP_ADDRESS" >}}/quotes
617+
{{< placeholder "GO_QUOTE_SERVICE_EXTERNAL_IP" >}}/quotes
619618
```
620619
621620
1. Now retrieve the stored quotes:
622621
623622
```command
624-
curl {{< placeholder "IP_ADDRESS" >}}/quotes
623+
curl {{< placeholder "GO_QUOTE_SERVICE_EXTERNAL_IP" >}}/quotes
625624
```
626625
627626
```output
@@ -639,15 +638,14 @@ When migrating from AWS EKS to LKE, there are several important factors to keep
639638
Cost reduction is one reason an organization might migrate from AWS EKS to LKE. Typically, the compute cost of Kubernetes is the primary driver for migration. Use `kubectl` to find the instance type and capacity type for your AWS EKS instance.
640639
641640
```command
642-
kubectl get node ip-192-168-31-10.us-west-1.compute.internal \
643-
-o yaml \
644-
| yq .metadata.labels \
645-
| rg 'node.kubernetes.io/instance-type|capacityType'
641+
kubectl get node {{< placeholder "EKS_NODE_1_NAME" >}} -o yaml \
642+
| yq .metadata.labels \
643+
| rg 'node.kubernetes.io/instance-type|capacityType'
646644
```
647645
648646
```output
649-
eks.amazonaws.com/capacityType: ON_DEMAND
650-
node.kubernetes.io/instance-type: t3.medium
647+
eks.amazonaws.com/capacityType: {{< placeholder "CAPACITY_TYPE" >}}
648+
node.kubernetes.io/instance-type: {{< placeholder "INSTANCE_TYPE" >}}
651649
```
652650
653651
Reference the [AWS pricing page for EC2 On-Demand Instances](https://aws.amazon.com/ec2/pricing/on-demand/) to find the cost for your EKS instance. Compare this with the cost of a Linode instance with comparable resources by examining the [Linode pricing page](https://www.linode.com/pricing/).

0 commit comments

Comments
 (0)