curl -Lo minikube https://github.com/kubernetes/minikube/releases/download/v1.5.2/minikube-linux-amd64 && chmod +x minikube
sudo mkdir -p /usr/local/bin/
sudo install minikube /usr/local/bin/
https://kubernetes.io/docs/tasks/tools/install-minikube/
minikube stop -p test-cluster
minikube delete -p test-cluster
# VM parameters affect only the first time (at create)
minikube \
--memory 8192 \
--cpus 4 \
--disk-size='20000mb' \
--vm-driver=virtualbox \
-p test-cluster \
start
Logs
π [test-cluster] minikube v1.5.2 on Ubuntu 18.04
πΏ Downloading VM boot image ...
> minikube-v1.5.1.iso.sha256: 65 B / 65 B [--------------] 100.00% ? p/s 0s
> minikube-v1.5.1.iso: 143.76 MiB / 143.76 MiB [-] 100.00% 82.91 MiB p/s 2s
π₯ Creating virtualbox VM (CPUs=4, Memory=8192MB, Disk=20000MB) ...
π³ Preparing Kubernetes v1.16.2 on Docker '18.09.9' ...
πΎ Downloading kubelet v1.16.2
πΎ Downloading kubeadm v1.16.2
π Pulling images ...
π Launching Kubernetes ...
β Waiting for: apiserver
π Done! kubectl is now configured to use "test-cluster"
VBoxManage list runningvms
"test-cluster" {9d06f9d7-2c61-457c-acb9-7cf5acaa62d1}
VBoxManage showvminfo "test-cluster" | egrep -i '(memory size|number of cpu)'
minikube -p test-cluster stop
VBoxManage modifyvm "test-cluster" \
--cpus 4 \
--memory 8192
VBoxManage showvminfo "test-cluster" | egrep -i '(memory size|number of cpu)'
minikube -p test-cluster start
https://kubernetes.io/docs/tasks/tools/install-kubectl/#install-kubectl-on-linux
kubectl -n kube-system get pod
minikube dashboard -p test-cluster
Helm 2
https://helm.sh/docs/intro/install/
curl https://raw.githubusercontent.com/helm/helm/master/scripts/get > get_helm.sh
chmod 700 get_helm.sh
./get_helm.sh
# Install Tiller
helm init
# Wait a little bit ... then
helm repo add incubator http://storage.googleapis.com/kubernetes-charts-incubator
helm del --purge spark-example
helm install incubator/sparkoperator \
--namespace spark-operator \
--set sparkJobNamespace=default \
--set enableWebhook=true \
--name spark-example \
--version 0.4.5
helm status spark-example
Helm 3 (Not working yet)
https://helm.sh/docs/intro/install/
curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 > get_helm.sh
chmod 700 get_helm.sh
./get_helm.sh
helm repo add incubator http://storage.googleapis.com/kubernetes-charts-incubator
helm repo update
helm del spark-example
helm install incubator/sparkoperator \
--namespace spark-operator \
--set sparkJobNamespace=default \
--set enableWebhook=true \
--set name=spark-example \
--version 0.4.5
helm status spark-example
kubectl create serviceaccount spark --namespace=default
kubectl create clusterrolebinding spark-role --clusterrole=edit --serviceaccount=default:spark
kubectl auth can-i create pod --as=system:serviceaccount:default:spark
kubectl auth can-i create pod --as=system:serviceaccount:default:spark-example-spark
kubectl auth can-i create pod --as=system:serviceaccount:spark-operator:spark-example-sparkoperator
kubectl delete pod spark-pi-driver ; \
kubectl delete sparkapplication.sparkoperator.k8s.io/spark-pi ; \
kubectl apply -f examples/spark-pi.yaml
kubectl get sparkapplications spark-pi -o=yaml
kubectl describe sparkapplication spark-pi
kubectl get events --sort-by=.metadata.creationTimestamp
# Get all entities
kubectl get service --all-namespaces
kubectl get namespace
kubectl get serviceaccount --all-namespaces
# Get all pods info
kubectl get pods -o yaml
# Get configmap
kubectl get configmap