Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions scripts/cluster-creation/aks-engine.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,8 @@ while getopts 'hs:c:w:d:l:' opt; do
}
create_cluster()
{

sudo touch kubernetes.json
sudo chmod 777 kubernetes.json
# For docker runtime, remove kubernetesConfig block
cat >> kubernetes.json <<EOL
sudo tee kubernetes.json > /dev/null << 'EOF'
{
"apiVersion": "vlabs",
"properties": {
Expand Down Expand Up @@ -132,7 +129,7 @@ cat >> kubernetes.json <<EOL
}
}
}
EOL
EOF

echo "deploying aks-engine cluster ..."
sudo aks-engine deploy --subscription-id ${subscriptionId} --client-id ${clientId} --client-secret ${clientSecret} --dns-prefix ${dnsPrefix} --location ${location} --api-model kubernetes.json
Expand All @@ -158,6 +155,4 @@ echo "creating cluster: ${ClusterName}"
create_cluster
echo "creating aks-engine cluster completed."

echo "changing file permissions to access the kubeconfig"
sudo chmod -R 777 ~/${TEMP_DIR}/_output
echo "kubeconfig of this cluster should be under ~/${TEMP_DIR}/_output/${dnsPrefix}/kubeconfig"
7 changes: 3 additions & 4 deletions scripts/cluster-creation/onprem-k8s.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,14 @@ download_install_docker()

create_cluster()
{
sudo touch kind-config.yaml
sudo chmod 777 kind-config.yaml
cat >> kind-config.yaml <<EOL
sudo tee kind-config.yaml > /dev/null << 'EOF'
kind: Cluster
apiVersion: kind.sigs.k8s.io/v1alpha3
nodes:
- role: control-plane
- role: worker
EOL
EOF

sudo kind create cluster --config kind-config.yaml --name $clusterName
}

Expand Down