github.com/noironetworks/cilium-net@v1.6.12/contrib/scripts/minikube.sh (about)

     1  #!/bin/bash
     2  
     3  set -eux
     4  
     5  KUBERNETES_VERSION=${KUBERNETES_VERSION:-v1.13.2}
     6  
     7  export MINIKUBE_NETWORK_PLUGIN="cni"
     8  export MINIKUBE_EXTRA_CONFIG="kubelet.network-plugin=cni"
     9  export MINIKUBE_MEMORY=5120
    10  export MINIKUBE_KUBERNETES_VERSION="${KUBERNETES_VERSION}"
    11  unset CONTAINER_ENGINE
    12  
    13  minikube start
    14  # TODO(mrostecki): Support cri-o and buildah.
    15  eval $(minikube docker-env)
    16  
    17  make docker-image DOCKER_IMAGE_TAG=dev
    18  
    19  version="${KUBERNETES_VERSION:1}"
    20  version_minor="${version%.*}"
    21  cp "examples/kubernetes/${version_minor}/cilium-minikube.yaml" /tmp/cilium-minikube.yaml
    22  
    23  sed -i 's|latest|dev|g' /tmp/cilium-minikube.yaml
    24  sed -i 's|docker.io/||g' /tmp/cilium-minikube.yaml
    25  sed -i 's|imagePullPolicy: Always|imagePullPolicy: Never|g' /tmp/cilium-minikube.yaml
    26  
    27  kubectl create -f /tmp/cilium-minikube.yaml