I’ll probably skip the creating of the a VM, and assume that you already have SSH access to a Ubuntu VM hosted on Azure. Following…
Here’s my response to the challenge. To make things really complicated, lets do an overkill and utilize docker containers instead of a VM. If you…
#https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-2017 apt-get install update
1 |
apt-get install software-properties-common apt-utils |
add-apt-repository ppa:ondrej/php -y apt-get update apt-get install php7.2 php7.2-dev php7.2-xml -y –allow-unauthenticated apt-get install gnupg gnupg2 gnupg1 curl https://packages.microsoft.com/keys/microsoft.asc |…
First install chocolately in admin command prompt https://docs.helm.sh/using_helm
1 |
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin" |
1 2 3 4 |
choco install kubernetes-helm #if you already have RBAC k8s cluster |
1 |
1 |
kubectl create serviceaccount --namespace</code><code>kube-system default |
1 2 |
kubectl create clusterrolebinding kubernetes-default --clusterrole=cluster-admin --serviceaccount=kube-system:default #install tiller |
1 |
helm init --canary-image <code>--service-account default</code> |
1 2 3 4 |
helm repo update #if you screw it up and want to fix it, you can either Delete or Upgrade |
1 2 3 4 |
kubectl delete deployment tiller-deploy --namespace kube-system helm init --upgrade --service-account default |
1 |
kubectl patch deploy --namespace kube-system tiller-deploy -p '{"spec":{"template":{"spec":{"serviceAccount":"default"}}}}' |
1 |
1 |
1 2 3 |
kubectl create clusterrolebinding kubernetes-default --clusterrole=cluster-admin --serviceaccount=kube-system:default create a file named <code>hello-world-ingress.yaml</code> and copy in the following example YAML: apiVersion: extensions/v1beta1 kind: Ingress metadata: name: hello-world-ingress annotations: kubernetes.io/ingress.class: nginx certmanager.k8s.io/cluster-issuer: letsencrypt-staging nginx.ingress.kubernetes.io/rewrite-target: / spec: tls: - hosts: - tanchunsiong.com secretName: tls-secret rules: - host: tanchunsiong.com http: paths: - path: / backend: serviceName: projectnami servicePort: 80 <code> |