See this.
-
make sure you have a working
goenv with aGO_PATH -
cd ~/go/srcandgit clone [email protected]:Azure/acs-engine.git -
make ciand deal with a bunch of dep hiccups
**note, you can skip building acs-engine above by using a docker image. use:
alias acs-engine='docker run -v pwd:/files -it navicore/acs-engine:03162017'
-
install az
curl -L https://aka.ms/InstallAzureCli | bash -
login with az
az login -
install kubectrl
az acs kubernetes install-cli
create service principal
az ad sp create-for-rbac -n "k8s-1-sp --role="Contributor"edit copy of examples/kubernetes.json
./acs-engine ./k8s-1.jsoncreate resource group
az group create --name "k8s-1" --location westuscreate deployment
az group deployment create --name "k8s-1" --resource-group "k8s-1" --template-file "./_output/Kubernetes-12381313/azuredeploy.json" --parameters "@./_output/Kubernetes-12381313/azuredeploy.parameters.json"get kubectl creds (silently clobbers ~/.kube/config)
az acs kubernetes get-credentials --dns-prefix=onextent-m --location=westustalk to kubernetes
kubectl get nodesweb ui
kubectl proxythen kubectl proxy
kubectl create secret docker-registry myregistrykey --docker-email [email protected] --docker-username USERNAME --docker-password PASSWORD [--docker-server SERVER]access:
apiVersion: v1
kind: Pod
metadata:
name: whatever
spec:
containers:
- name: whatever
image: index.docker.io/DOCKER_USER/PRIVATE_REPO_NAME:latest
imagePullPolicy: Always
command: [ "echo", "SUCCESS" ]
imagePullSecrets:
- name: myregistrykeykubectl run nginx1 --image nginx
kubectl expose deployment nginx2 --port=80
change type to LoadBalancer
kubectl edit svc/nginx2