<p>I'm running Skaffold with a few apps in Development :</p>
<p><strong>Skaffold.yaml</strong></p>
<pre><code>apiVersion: skaffold/v2alpha3
kind: Config
deploy:
  kubectl:
    manifests:
      - ./infra/k8s/*
build:
  local:
    push: false
  artifacts:    
    - image: MYDOCKERID/client
      context: client
      docker:
        dockerfile: Dockerfile
      sync:
        manual:
          - src: '**/*.js'
            dest: .
</code></pre>
<p><strong>Dockerfile of client :</strong></p>
<pre><code>FROM node:alpine

WORKDIR /app
COPY package.json .
RUN npm install
COPY . .

CMD [&quot;npm&quot;, &quot;run&quot;, &quot;dev&quot;]
</code></pre>
<p><strong>client-depl.yaml</strong></p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: client-depl
spec:
  replicas: 1
  selector:
    matchLabels:
      app: client
  template:
    metadata:
      labels:
        app: client
    spec:
      containers:
        - name: client
          image: MYDOCKERID/client
---
apiVersion: v1
kind: Service
metadata:
  name: client-srv
spec:
  selector:
    app: client
  ports:
    - name: client
      protocol: TCP
      port: 3000
      targetPort: 3000
</code></pre>
<p>When executing <code>skaffold dev</code> from command line everything is compiled perfectly :</p>
<pre><code>[92m[client-depl-5bdc8cffcd-s9z9r client] [0mevent - compiled successfully
[92m[client-depl-5bdc8cffcd-s9z9r client] [0mwait  - compiling...
[92m[client-depl-5bdc8cffcd-s9z9r client] [0mAttention: Next.js now collects completely anonymous telemetry regarding usage.
[92m[client-depl-5bdc8cffcd-s9z9r client] [0mThis information is used to shape Next.js' roadmap and prioritize features.
[92m[client-depl-5bdc8cffcd-s9z9r client] [0mYou can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
[92m[client-depl-5bdc8cffcd-s9z9r client] [0mhttps://nextjs.org/telemetry
[92m[client-depl-5bdc8cffcd-s9z9r client] [0m
[92m[client-depl-5bdc8cffcd-s9z9r client] [0mevent - compiled successfully
</code></pre>
<p>I've added the domain in Hosts file in Windows etc folder :</p>
<pre><code># Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

# localhost name resolution is handled within DNS itself.
#   127.0.0.1       localhost
#   ::1             localhost

127.0.0.1 ticketing.dev
</code></pre>
<p>However when typing in Chrome <code>ticketing.dev</code> I get :</p>
<p><a href="https://i.stack.imgur.com/8Ha3M.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8Ha3M.gif" alt="enter image description here" /></a></p>
<p>How can I run the app in Chrome and overcome this message ?</p>

JAN
<p>You are missing a certificate to have your connection secure. You will also need to configure the <code>ingress</code> to use the cert that you create.</p>
<p>You should read <a href="https://kubernetes.io/docs/tasks/tls/managing-tls-in-a-cluster/" rel="nofollow noreferrer">Manage TLS Certificates in a Cluster</a>.</p>
<blockquote>
<p>Kubernetes provides a <code>certificates.k8s.io</code> API, which lets you provision TLS certificates signed by a Certificate Authority (CA) that you control. These CA and certificates can be used by your workloads to establish trust.</p>
</blockquote>
<p>You can have a look into a nice guide on how to <a href="https://medium.com/@cloudark/adding-ssl-tls-support-to-applications-in-kubernetes-native-way-dd31f016ac5e" rel="nofollow noreferrer">Adding SSL/TLS support to applications in Kubernetes-native way</a>.</p>
<p>You can create a self-signed certificate, <a href="https://medium.com/the-new-control-plane/generating-self-signed-certificates-on-windows-7812a600c2d8" rel="nofollow noreferrer">this medium article</a> shows how to do that on Windows.</p>
<p>On Linux you can do following:</p>
<pre><code>[root]# mkdir certs
[root]# openssl req -nodes -newkey rsa:2048 -keyout certs/ticketing.key -out certs/ticketing.csr -subj &quot;/C=/ST=/L=/O=/OU=/CN=default&quot;
[root]# openssl x509 -req -sha256 -days 365 -in certs/ticketing.csr -signkey certs/ticketing.key -out certs/ticketing.crt
</code></pre>
<p>This will create a cert that is valid for 365 days.
Then create a <code>secret</code> which will hold your cert:</p>
<pre><code>kubectl create secret generic ticketing-certs --from-file=certs -n default
</code></pre>
<p>Once the cert and <code>secret</code> is ready you should create an <code>ingress</code>:</p>
<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: example1-ingress
spec:
tls:
  - hosts:
    - www.ticketing.dev
    secretName: ticketing-cert
  rules:
  - host: www.ticketing.dev
  http:
   paths:
   - path: /
   backend:
     serviceName: client-srv
     servicePort: 3000
</code></pre>
<p>Let me know if you need anything more.</p>
