bla bla
kubectl apply ...
Copyright 2019
bla bla
kubectl apply ...
Copyright 2019
## compile kubectl | |
./hack/build-go.sh | |
./hack/build-go.sh cmd/kubectl | |
KUBE_VERBOSE=9 V=9 make --no-print-directory -C ./hack/.. all WHAT=cmd/kubectl | |
./hack/make-rules/build.sh cmd/kubectl |
Docker just opensourced compose-on-kubernetes (COK for short), and I wanted to run on GKE. This is the jurney:
You will be able to use plain-old-compose files against k8s. Actually the docker-compose.yml have to be transformed to a Stack CustomResourceDefinition, and than a controller will take care of creating the all the necesseary k8s resources (deployments, services)
You can create those CRDs in 2 ways:
## usage: . <(curl -sL bit.ly/kubectl-fix) | |
if ! [[ "$KUBECTL_AUTOCOMP_FIXED" ]]; then | |
__kubectl_get_resource () { if [[ ${#nouns[@]} -eq 0 ]]; then local kubectl_out; if kubectl_out=$(kubectl api-resources $(__kubectl_override_flags) -o name --cached --verbs=get 2>/dev/null); then COMPREPLY=($( compgen -W "${kubectl_out[*]}" -- "$cur" )); return 0; fi; return 1; fi; __kubectl_parse_get "${nouns[${#nouns[@]} -1]}"; } | |
KUBECTL_AUTOCOMP_FIXED=1 | |
fi |
minikube is an easy way to work with local kubernetes on osx. By default its uses VirtulBox to create a VM which hosts docker/kubernetes. But you can use different vm drivers to manage the VM. Hyperkit seems to be a more reliable hypervisor.
The rest of this document explains how to use minikube with the hyperkit driver
You can check if you have minikube installed:
$ minikube version
use openresty/openresty:alpine
as a base image it has an /etc/nginx/conf.d/ dir
location /lua {
content_by_lua '
ngx.say("hello from lua")
ngx.say("host: ", os.getenv("HOSTNAME"))
';
}
apiVersion: v1 | |
data: | |
index.html: hello from config | |
kind: ConfigMap | |
metadata: | |
name: webconfig | |
--- | |
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: |