See this.
-
make sure you have a working
go
env with aGO_PATH
-
cd ~/go/src
andgit clone git@github.com:Azure/acs-engine.git
-
make ci
and 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.json
create resource group
az group create --name "k8s-1" --location westus
create 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=westus
talk to kubernetes
kubectl get nodes
web ui
kubectl proxy
then kubectl proxy
kubectl create secret docker-registry myregistrykey --docker-email ed@onextent.com --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: myregistrykey
kubectl run nginx1 --image nginx
kubectl expose deployment nginx2 --port=80
change type to LoadBalancer
kubectl edit svc/nginx2