-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDeploy.ps1
23 lines (20 loc) · 830 Bytes
/
Deploy.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
[CmdletBinding()]
param (
[Parameter(Mandatory = $true)]
[string] $Hostname
)
Write-Host "Waiting to connect to the cluster..."
.\kubectl version *>$null
while (!$?){
Start-Sleep -seconds 5
.\kubectl version *>$null
}
.\helm repo add jetstack https://charts.jetstack.io
.\helm repo add rancher-stable https://releases.rancher.com/server-charts/stable
.\helm repo update
.\kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/latest/download/cert-manager.crds.yaml
.\kubectl create namespace cert-manager
.\helm install cert-manager jetstack/cert-manager --namespace cert-manager --wait
.\kubectl create namespace cattle-system
.\helm install rancher rancher-stable/rancher --namespace cattle-system --set hostname=$hostname
.\kubectl -n cattle-system rollout status deploy/rancher