SQL Container issue
rajurh opened this issue · comments
Raju RH commented
Thanks for sharing the demo's. I was trying the samples by going through udemy and found sql deployment yaml on local file is not compatible with kubectl version v1.16 which I corrected to below one but after deployment I am still facing issue with pod getting crashed " Back-off restarting failed container"
Below template api version had to change to make it compatible with kubectl v1.16 and Selector section added rest I am using existing template.
PS C:\WINDOWS\system32> minikube start
* minikube v1.5.2 on Microsoft Windows 10 Pro 10.0.18362 Build 18362
* Tip: Use 'minikube start -p <name>' to create a new cluster, or 'minikube delete' to delete this one.
* Starting existing hyperv VM for "minikube" ...
* Waiting for the host to be provisioned ...
* Preparing Kubernetes v1.16.2 on Docker '18.09.9' ...
* Relaunching Kubernetes using kubeadm ...
* Waiting for: apiserver
* Done! kubectl is now configured to use "minikube"
Help on this will be much appreciated. I am trying to run minikube locally
apiVersion: apps/v1
kind: Deployment
metadata:
name: mssql-deployment
spec:
selector:
matchLabels:
app: mssql
replicas: 1
template:
metadata:
labels:
app: mssql
spec:
terminationGracePeriodSeconds: 10
containers:
- name: mssql
image: mcr.microsoft.com/mssql/server:2017-latest
ports:
- containerPort: 1433
env:
- name: ACCEPT_EULA
value: "Y"
- name: MSSQL_SA_PASSWORD
value: "Welcome1!"
---
apiVersion: v1
kind: Service
metadata:
name: mssql-service
spec:
selector:
app: mssql
ports:
- protocol: TCP
port: 1433
targetPort: 1433
nodePort: 30200
type: NodePort