Deploying a JEG pod to a node group
JEG (Jupyter Enterprise Gateway) pod placement is a feature that allows you to deploy an
interactive endpoint on a specific node group. With this feature, you can configure settings
such as instance type
for the interactive endpoint.
Associating a JEG pod to a managed node group
The following configuration property allows you to specify the name of a managed node group on your Amazon EKS cluster where the JEG pod will be deployed.
//payload --configuration-overrides '{ "applicationConfiguration": [ { "classification": "endpoint-configuration", "properties": { "managed-nodegroup-name":
NodeGroupName
} } ] }'
A node group must have the Kubernetes label
for-use-with-emr-containers-managed-endpoint-ng=
attached to all nodes that are part of the node group. To list all nodes of a node group
that have this tag, use the following command:NodeGroupName
kubectl get nodes --show-labels | grep for-use-with-emr-containers-managed-endpoint-ng=
NodeGroupName
If the output of the command above doesn't return nodes that are part of your managed
node group, then there are no nodes in the node group that have the
for-use-with-emr-containers-managed-endpoint-ng=
Kubernetes label attached. In this case, follow the steps below to attach that label to
the nodes in your node group.NodeGroupName
-
Use the following command to add the
for-use-with-emr-containers-managed-endpoint-ng=
Kubernetes label to all nodes in a managed node groupNodeGroupName
:NodeGroupName
kubectl label nodes --selector eks:nodegroup-name=
NodeGroupName
for-use-with-emr-containers-managed-endpoint-ng=NodeGroupName
-
Verify that the nodes were labeled correctly using the following command:
kubectl get nodes --show-labels | grep for-use-with-emr-containers-managed-endpoint-ng=
NodeGroupName
A managed node group must be associated with an Amazon EKS cluster’s security group, which
is usually the case if you created your cluster and managed node group using
eksctl
. You can verify this in the Amazon console using the following
steps.
-
Go to your cluster in the Amazon EKS console.
-
Go to the networking tab of your cluster and note down the cluster security group.
-
Go to the compute tab of your cluster and click on the managed node group name.
-
Under the Details tab of the managed node group, verify that the cluster security group that you noted previously is listed under Security groups.
If the managed node group is not attached to the Amazon EKS cluster security group, you
need to attach the
for-use-with-emr-containers-managed-endpoint-sg=
tag to the node group security group. Use the steps below to attach this tag.ClusterName
/NodeGroupName
-
Go to the Amazon EC2 console and click on security groups on the left navigation pane.
-
Select your managed node group’s security group by clicking the checkbox.
-
Under the Tags tab, add the tag
for-use-with-emr-containers-managed-endpoint-sg=
using the Manage tags button.ClusterName
/NodeGroupName
Associating a JEG pod to a self-managed node group
The following configuration property allows you to specify the name of a self-managed or unmanaged node group on the Amazon EKS cluster where the JEG pod will be deployed.
//payload --configuration-overrides '{ "applicationConfiguration": [ { "classification": "endpoint-configuration", "properties": { "self-managed-nodegroup-name":
NodeGroupName
} } ] }'
The node group must have
for-use-with-emr-containers-managed-endpoint-ng=
Kubernetes label attached to all nodes that are part of the node group. To list all the
nodes of a node group that have this tag, use the following command:NodeGroupName
kubectl get nodes --show-labels | grep for-use-with-emr-containers-managed-endpoint-ng=
NodeGroupName
If the output of the command above doesn't return nodes that are part of your
self-managed node group, then there are no nodes in the node group that have the
for-use-with-emr-containers-managed-endpoint-ng=
Kubernetes label attached. In this case, follow the steps below to attach that label to
the nodes in your node group.NodeGroupName
-
If you created the self-managed node group using
eksctl
, then use the following command to add thefor-use-with-emr-containers-managed-endpoint-ng=
Kubernetes label to all nodes in the self-managed node groupNodeGroupName
at once.NodeGroupName
kubectl label nodes --selector alpha.eksctl.io/nodegroup-name=
NodeGroupName
for-use-with-emr-containers-managed-endpoint-ng=NodeGroupName
If you didn’t use
eksctl
to create the self-managed node group, then you will need to replace the selector in the above command to a different Kubernetes label that is attached to all the nodes of the node group. -
Use the following command to verify that the nodes were labeled correctly:
kubectl get nodes --show-labels | grep for-use-with-emr-containers-managed-endpoint-ng=
NodeGroupName
The security group for the self-managed node group must have the
for-use-with-emr-containers-managed-endpoint-sg=
tag attached. Use the following steps to attach the tag to the security group from the
Amazon Web Services Management Console.ClusterName
/NodeGroupName
-
Navigate to the Amazon EC2 console. Select Security groups on the left navigation pane.
-
Select the checkbox next to the security group for your self-managed node group.
-
Under the Tags tab, use the Manage tags button to add the tag
for-use-with-emr-containers-managed-endpoint-sg=
. ReplaceClusterName
/NodeGroupName
andClusterName
with appropriate values.NodeGroupName
Associating a JEG pod to a managed node group with On-Demand instances
You can also define additional labels, known as Kubernetes label selectors, to specify additional constraints or restrictions to run an interactive endpoint on a given node or node group. The following example shows how to use On-Demand Amazon EC2 instances for a JEG pod.
--configuration-overrides '{ "applicationConfiguration": [ { "classification": "endpoint-configuration", "properties": { "managed-nodegroup-name":
NodeGroupName
, "node-labels": "eks.amazonaws.com/capacityType:ON_DEMAND" } } ] }'
Note
You can only use the node-labels
property with
either with a managed-nodegroup-name
or
self-managed-nodegroup-name
property.