Skip to content

noelmcloughlin/k8s-statefulsets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 

Repository files navigation

   **************
   MINIKUBE NOTES
   **************

*  MACOS *
   *****
   Change versions to your preference.

   * INSTALL
   rm -f ~/.minikube
   brew install hyperkit docker-machine-driver-hyperkit
   sudo chown root:wheel /usr/local/bin/docker-machine-driver-hyperkit
   sudo chmod u+s /usr/local/bin/docker-machine-driver-hyperkit

   * UPGRADE
   ## Note: Docker Desktop includes hyperkit so upgrade Docker Desktop instead. ##
   brew upgrade hyperkit && brew link --overwrite hyperkit
   curl -Lo minikube https://github.com/kubernetes/minikube/releases/download/v1.11.0/minikube-darwin-amd64
   chown +x minikube && sudo mv minikube /usr/local/bin/

   * RUN
   minikube delete
   minikube config set vm-driver hyperkit && minikube start --cpus 4 --memory 6144 --feature-gates="AllAlpha=true,BoundServiceAccountTokenVolume=false" --extra-config=apiserver.service-node-port-range=1-65535 --network-plugin=cni --extra-config=kubelet.network-plugin=cni --kubernetes-version=v1.18.3
   minikube addons enable ingress


*  LINUX *
   *******
   minikube start --cpus 4 --memory 6144 --feature-gates="AllAlpha=true,BoundServiceAccountTokenVolume=false" --extra-config=apiserver.service-node-port-range=1-65535 --network-plugin=cni --extra-config=kubelet.network-plugin=cni --kubernetes-version=v1.18.3



  ************************
  KUBERNETES STATEFULSETS
  ************************

* WP/MYSQL *

  kubectl apply -f mysql-wordpress-set.yaml
  kubectl get pods; kubectl logs -l app=mysql,wordpress    # todo: check syntax for multiples?
  kubectl delete -f mysql-wordpress-set.yaml


* REDIS *

  kubectl apply -f redis-set.yaml
  kubectl get pods; kubectl logs -l app=redis
  kubectl delete -f redis-set.yaml


* MONGODB Replicaset (without sidecar) *

  kubectl apply -f mongo-set.yaml
  kubectl get pods; kubectl logs -l app=mongo

   MONG=$(kubectl cluster-info |awk -F: '{print $2}' |sed -e s@/@@g |head -1)
   mongo --host $MONG:27017 -u myroot -p myroot

  kubectl delete -f mongo-set.yaml


  TROUBLESHOOTING
  ***************

* Cleanup PV/PVC's stuck terminating *
  kubectl delete pvc --all --force --grace-period=0; kubectl delete pv --all --force --grace-period=0; kubectl get all

Releases

No releases published

Packages

No packages published