-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add minikube-install support using kvm2 for: (#31)
* add minikube-install support using kvm2 for: * debian * ubuntu * fedora * centos * separate minikube-setup and minikube-start * allow minikube start with psp and rbac support NOTES: Previously, one would need to execute minikube-install to start minikube with the rbac and psp policies enabled as these extra arguments are not supported in the minikube config. This update allows the use of `minikube-start` to spin up minikube in a production-like state without remembering the correct arguments. In addition, this update brings minikube support to the popular linux distributions: debian, ubuntu, fedora, and centos.
- Loading branch information
1 parent
c885913
commit b0b8a78
Showing
9 changed files
with
85 additions
and
26 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,8 @@ | ||
#!/usr/bin/env bash | ||
|
||
brew cask install minikube 1>/dev/null 2>&1 | ||
brew install hyperkit 1>/dev/null 2>&1 | ||
|
||
# setup the hypervisor | ||
brew install hyperkit | ||
minikube config set vm-driver hyperkit | ||
minikube config set cpus 4 | ||
minikube config set memory 4096 | ||
minikube config set bootstrapper kubeadm | ||
|
||
# detect missing psp | ||
if [ ! -f "$HOME/.minikube/addons/psp.yaml" ]; then | ||
|
||
# add default psp | ||
cat $HOME/.am/prompt/scripts/Darwin/psp.yaml > $HOME/.minikube/addons/psp.yaml | ||
fi | ||
|
||
# enable all the things | ||
minikube start \ | ||
--kubernetes-version=1.15.5 \ | ||
--extra-config=apiserver.authorization-mode=RBAC \ | ||
--extra-config=apiserver.enable-admission-plugins="PodSecurityPolicy" | ||
|
||
# enable the dashboard and heapter | ||
minikube config set dashboard true | ||
minikube config set heapster true | ||
|
||
# make sure ingress is off | ||
minikube config set ingress false | ||
# setup minikube | ||
minikube-setup |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/env bash | ||
|
||
# install the hypervisor | ||
sudo yum install -y qemu-kvm libvirt libvirt-python libguestfs-tools virt-install | ||
systemctl enable libvirtd | ||
systemctl start libvirtd | ||
|
||
# set the vm-driver | ||
minikube config set vm-driver kvm2 | ||
|
||
# setup minikube | ||
minikube-setup |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/usr/bin/env bash | ||
|
||
# install the hypervisor | ||
sudo apt-get install -y qemu-kvm libvirt-clients libvirt-daemon-system | ||
sudo adduser `id -un` libvirt | ||
|
||
# install minikube | ||
brew install minikube | ||
|
||
# set the vm-driver | ||
minikube config set vm-driver kvm2 | ||
|
||
# setup minikube | ||
minikube-setup |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env bash | ||
|
||
# install the hypervisor | ||
sudo dnf install @virtualization | ||
sudo systemctl start libvirtd | ||
sudo systemctl enable libvirtd | ||
|
||
# install minikube | ||
brew install minikube | ||
|
||
# set the vm-driver | ||
minikube config set vm-driver kvm2 | ||
|
||
# setup minikube | ||
minikube-setup |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/usr/bin/env bash | ||
|
||
minikube config set cpus 4 | ||
minikube config set memory 4096 | ||
minikube config set bootstrapper kubeadm | ||
minikube config set kubernetes-version 1.15.5 | ||
|
||
# enable the dashboard and heapter | ||
minikube config set dashboard true | ||
minikube config set heapster true | ||
|
||
# make sure ingress is off | ||
minikube config set ingress false | ||
|
||
# detect missing psp | ||
if [ ! -f "$HOME/.minikube/addons/psp.yaml" ]; then | ||
|
||
# get default pod security policy | ||
curl -L https://github.com/kubernetes/minikube/files/3065532/psp.txt -o $HOME/.minikube/addons/psp.yaml | ||
fi | ||
|
||
# start minikube | ||
minikube-start |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env bash | ||
|
||
# start minikube with rbac and psp | ||
minikube start \ | ||
--extra-config=apiserver.authorization-mode=RBAC \ | ||
--extra-config=apiserver.enable-admission-plugins="PodSecurityPolicy" |
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/env bash | ||
|
||
# install the hypervisor | ||
sudo apt-get install -y qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils | ||
|
||
# set the vm-driver | ||
minikube config set vm-driver kvm2 | ||
|
||
# setup minikube | ||
minikube-setup |