Last active
March 28, 2024 02:41
-
-
Save initcron/40b71211cb693f541ce35fe3fb1adb11 to your computer and use it in GitHub Desktop.
kubernetes user data script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
apt-get update | |
apt-get install -y git wget | |
# Install Docker | |
apt-get install -yq \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
gnupg-agent \ | |
software-properties-common | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
apt-key fingerprint 0EBFCD88 | |
add-apt-repository \ | |
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \ | |
$(lsb_release -cs) \ | |
stable" | |
apt-get update | |
apt-get install -yq docker-ce docker-ce-cli containerd.io | |
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - | |
sudo cat <<EOF > /etc/apt/sources.list.d/kubernetes.list | |
deb http://apt.kubernetes.io/ kubernetes-xenial main | |
EOF | |
sudo apt-get update -y | |
sudo apt-get install -y kubelet kubeadm kubectl kubernetes-cni nfs-common | |
# Install Docker Compose | |
sudo curl -L "https://github.com/docker/compose/releases/download/1.28.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | |
sudo chmod +x /usr/local/bin/docker-compose | |
sudo sysctl net.bridge.bridge-nf-call-iptables=1 | |
sudo swapoff -a | |
sudo rm -rf /var/lib/kubelet/* | |
sudo apt-get install nfs-common -y | |
Thanks for using the script :) Dashboard is broken due to incompatibility
with kubernetes version 1.16. I am going to fix it later this month.
…On Sun, Nov 3, 2019 at 6:01 PM theluli ***@***.***> wrote:
Hi
Script is good , it works , also found your ultimate kubernetes page
useful, but l can not get dashboard working , does have to do because l am
using ubuntu 18.x
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<https://gist.github.com/40b71211cb693f541ce35fe3fb1adb11?email_source=notifications&email_token=AAGVUCGQC4PYHVBDVD32JLTQR3ACJA5CNFSM4JILCQY2YY3PNVWWK3TUL52HS4DFVNDWS43UINXW23LFNZ2KUY3PNVWWK3TUL5UWJTQAF3R5C#gistcomment-3072977>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGVUCD7EVRTJJA47J6FSX3QR3ACJANCNFSM4JILCQYQ>
.
--
Gourav Shah Founder
School of Devops
m: 7022622628
w: www.schoolofdevops.com
a: 654, 22nd Cross, Sector 2, HSR Layout, Bangalore
<https://maps.google.com/?q=654,+22nd+Cross,+Sector+2,+HSR+Layout,+Bangalore&entry=gmail&source=g>
Follow us:
<https://schoolofdevops.teachable.com/> <https://github.com/schoolofdevops>
<https://twitter.com/schoolofdevops>
<https://www.youtube.com/channel/UCBYuGbHeNk_y4AKk3Ea0geA?view_as=public>
Thnx, please let me know when update is available
Br
…On Mon, Nov 4, 2019, 05:44 Gourav Shah ***@***.***> wrote:
Thanks for using the script :) Dashboard is broken due to incompatibility
with kubernetes version 1.16. I am going to fix it later this month.
On Sun, Nov 3, 2019 at 6:01 PM theluli ***@***.***> wrote:
> Hi
> Script is good , it works , also found your ultimate kubernetes page
> useful, but l can not get dashboard working , does have to do because l
am
> using ubuntu 18.x
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <
https://gist.github.com/40b71211cb693f541ce35fe3fb1adb11?email_source=notifications&email_token=AAGVUCGQC4PYHVBDVD32JLTQR3ACJA5CNFSM4JILCQY2YY3PNVWWK3TUL52HS4DFVNDWS43UINXW23LFNZ2KUY3PNVWWK3TUL5UWJTQAF3R5C#gistcomment-3072977
>,
> or unsubscribe
> <
https://github.com/notifications/unsubscribe-auth/AAGVUCD7EVRTJJA47J6FSX3QR3ACJANCNFSM4JILCQYQ
>
> .
>
--
Gourav Shah Founder
School of Devops
m: 7022622628
w: www.schoolofdevops.com
a: 654, 22nd Cross, Sector 2, HSR Layout, Bangalore
<
https://maps.google.com/?q=654,+22nd+Cross,+Sector+2,+HSR+Layout,+Bangalore&entry=gmail&source=g
>
Follow us:
<https://schoolofdevops.teachable.com/> <https://github.com/schoolofdevops
>
<https://twitter.com/schoolofdevops>
<https://www.youtube.com/channel/UCBYuGbHeNk_y4AKk3Ea0geA?view_as=public>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<https://gist.github.com/40b71211cb693f541ce35fe3fb1adb11?email_source=notifications&email_token=AC6WDTNOGPFMLTQ47K7NPVDQR6SDZA5CNFSM4JILCQY2YY3PNVWWK3TUL52HS4DFVNDWS43UINXW23LFNZ2KUY3PNVWWK3TUL5UWJTQAF3SUM#gistcomment-3073350>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AC6WDTNOMK27TUOJJEBRTGTQR6SDZANCNFSM4JILCQYQ>
.
Hi Gaurav
Could you please share the script for Centos 7 to set up kubernetes in case if you have??
Thanks
Shiva
Hi
Could you please share ?
Best regards
…On Tue, Feb 25, 2020, 09:07 shivakumar H N ***@***.***> wrote:
Hi Gaurav
Could you please share the script for Centos 7 to set up kubernetes in
case if you have??
Thanks
Shiva
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<https://gist.github.com/40b71211cb693f541ce35fe3fb1adb11?email_source=notifications&email_token=AC6WDTPFDMBY3CI7SG2FKCDRETGT5A5CNFSM4JILCQY2YY3PNVWWK3TUL52HS4DFVNDWS43UINXW23LFNZ2KUY3PNVWWK3TUL5UWJTQAGCTI6#gistcomment-3188367>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AC6WDTOQQ2JVDBZRTEO53Z3RETGT5ANCNFSM4JILCQYQ>
.
able to have arch linux
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Updated the copy of my fork
faced issue in GCP instance for docker installation, modification done and it helps