403Webshell
Server IP : 104.129.129.72  /  Your IP : 216.73.216.229
Web Server : LiteSpeed
System : Linux 123answers 5.15.0-143-generic #153-Ubuntu SMP Fri Jun 13 19:10:45 UTC 2025 x86_64
User : answe8064 ( 1002)
PHP Version : 8.2.28
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /opt/installer/dev/services/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/installer/dev/services/kubernetes
#!/bin/bash

# Add this at the begining of all scripts.
if [ -f "include/startup.sh" ]; then
    . include/startup.sh
elif [ -f "../include/startup.sh" ]; then
    . ../include/startup.sh
fi

checkOs
checkRootUser
runOnceCheck

# Kubernetes default installation directory
KUBEDIR=/opt/kubernetes/

echo "Updating OS to the latest version" | log
apt-get update -y | log
waitOrStop 0

echo "Installing service dependencies" | log
apt-get install curl gcc python-dev python-setuptools apt-transport-https apache2-utils lsb-release openssh-client git bash jq sshpass openssh-client bash-completion -y | log
waitOrStop 0

echo "Installing python-pip" | log
apt-get install python-pip -y | log
waitOrStop 0

echo "Installing pyyaml" | log
pip install -U crcmod 'python-dotenv[cli]' pyyaml | log
waitOrStop 0

echo "Creating $KUBEDIR directory" | log
mkdir -p $KUBEDIR
cd $KUBEDIR

echo "Downloading latest kubectl from Kubernetes repository" | log
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl | log
waitOrStop 0

echo "chmod kubectl" | log
chmod +x ./kubectl
waitOrStop 0

echo "Moving kubectl to /usr/local/bin" | log
mv ./kubectl /usr/local/bin/kubectl
waitOrStop 0

echo "Downloading latest helm" | log
curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get > get_helm.sh | log
waitOrStop 0
chmod 700 get_helm.sh
waitOrStop 0
./get_helm.sh | log
waitOrStop 0

echo "Downloading kamatera-k8s from github" | log
git clone https://github.com/OriHoch/kamatera-k8s.git $KUBEDIR/firstProject | log
waitOrStop 0

echo "Installation done on $KUBEDIR, read README.md to continue cluster creation." | log

tagScript success

Youez - 2016 - github.com/yon3zu
LinuXploit