I'm kind of here looking for clarification as can't seem to find it online.
I have a Dockerimage that bundles PHP-FPM/nginx.
When I hit port 80, it redirects to 443 with my certificates - Works perfectly and as intended.
I've recently been looking into Kubernetes and understand the basic concepts.
Im trying to get it up and running in Minikube but can't seem to get the SSL redirect working.
Is this posible?
Do I need to only use port 80 in my app and use SSL at ingress level?
apiVersion: extensions/v1beta1 kind: Deployment metadata: name: laravel-app spec: replicas: 1 minReadySeconds: 10 strategy: type: RollingUpdate rollingUpdate: maxUnavailable: 1 maxSurge: 1 selector: matchLabels: app: laravel-app template: metadata: labels: app: laravel-app spec: containers: - image: image/laravel-app:latest name: laravel-app ports: - name: 'http' containerPort: 80 - name: 'https' containerPort: 443 envFrom: - configMapRef: name: laravel-config --- apiVersion: extensions/v1beta1 kind: Ingress metadata: name: laravel-ingress annotations: ingress.kubernetes.io/rewrite-target: / spec: rules: - host: laravel.localhost http: paths: - path: / backend: serviceName: laravel-app-service servicePort: 80 - host: laravel.localhost http: paths: - path: / backend: serviceName: laravel-app-service servicePort: 443 --- apiVersion: v1 kind: Service metadata: name: laravel-app-service spec: type: LoadBalancer selector: app: laravel-app ports: - port: 80 name: 'http' protocol: TCP targetPort: 80 nodePort: 30080 - port: 443 name: 'https' protocol: TCP targetPort: 443 nodePort: 30443 --- apiVersion: v1 kind: ConfigMap metadata: name: laravel-config labels: name: laravel-config data: APP_ENV: "dev"