Giter Site home page Giter Site logo

spark-submit-eks-k8s-cluster's Introduction

spark-submit-eks-k8s-cluster

How to run Apache Spark on Kubernetes (Amazon EKS)

Pre-requisites:

- Install Java
- Install Git
- Install Maven
- Install Docker
- EKS Cluster

Install Java:

yum install java-1.8.0-openjdk-devel -y

Install Git:

yum install git -y

Install Apache-Maven:

wget https://mirrors.estointernet.in/apache/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz
tar xvzf apache-maven-3.6.3-bin.tar.gz

vi /etc/profile.d/maven.sh
--------------------------------------------
export MAVEN_HOME=/opt/apache-maven-3.6.3
export PATH=$PATH:$MAVEN_HOME/bin
--------------------------------------------

source /etc/profile.d/maven.sh
mvn -version

Install Docker:

yum install docker -y
service docker start

EKS Cluster Setup:

EKS Cluster Setup

Download Apache Spark

cd /opt
wget https://mirrors.estointernet.in/apache/spark/spark-2.4.7/spark-2.4.7-bin-hadoop2.7.tgz
tar xvf spark-2.4.7-bin-hadoop2.7.tgz

Go to spark main directory

cd spark-2.4.7-bin-hadoop2.7

Execute build command. This command should be executed from Spark parent directory

docker build -t cloudtechmasters/sparkimage:latest -f kubernetes/dockerfiles/spark/Dockerfile .

Login to DockerHub Account

docker login enter your username and password

Push your sparkimage to dockerhub account

docker push cloudtechmasters/sparkimage:latest

Let us use this image to run a simple spark program (Spark Pi) on Amazon EKS cluster. I have the EKS cluster running already with 2 nodes.

spark-submit-eks-k8s-cluster's People

Contributors

cloudtechmasters avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.