<p>Try to get started with skaffold, hitting lots of issues. So I went back to basics and tried to get the examples running:</p>
<ol>
<li>cloned <a href="https://github.com/GoogleContainerTools/skaffold" rel="nofollow noreferrer">https://github.com/GoogleContainerTools/skaffold</a></li>
<li>ran <code>cd ~/git/skaffold/examples/getting-started/</code> and then tried to get going;</li>
</ol>
<pre><code>$ skaffold dev --default-repo=aliwatters
Listing files to watch...
 - skaffold-example
Generating tags...
 - skaffold-example -&gt; aliwatters/skaffold-example:v1.18.0-2-gf0bfcccce
Checking cache...
 - skaffold-example: Not found. Building
Building [skaffold-example]...
Sending build context to Docker daemon  3.072kB
Step 1/8 : FROM golang:1.12.9-alpine3.10 as builder
 ---&gt; e0d646523991
Step 2/8 : COPY main.go .
 ---&gt; Using cache
 ---&gt; fb29e25db0a3
Step 3/8 : ARG SKAFFOLD_GO_GCFLAGS
 ---&gt; Using cache
 ---&gt; aa8dd4cbab42
Step 4/8 : RUN go build -gcflags=&quot;${SKAFFOLD_GO_GCFLAGS}&quot; -o /app main.go
 ---&gt; Using cache
 ---&gt; 9a666995c00a
Step 5/8 : FROM alpine:3.10
 ---&gt; be4e4bea2c2e
Step 6/8 : ENV GOTRACEBACK=single
 ---&gt; Using cache
 ---&gt; bdb74c01e0b9
Step 7/8 : CMD [&quot;./app&quot;]
 ---&gt; Using cache
 ---&gt; 15c248dd54e9
Step 8/8 : COPY --from=builder /app .
 ---&gt; Using cache
 ---&gt; 73564337b083
Successfully built 73564337b083
Successfully tagged aliwatters/skaffold-example:v1.18.0-2-gf0bfcccce
The push refers to repository [docker.io/aliwatters/skaffold-example]
37806ae41d23: Preparing
1b3ee35aacca: Preparing
37806ae41d23: Pushed
1b3ee35aacca: Pushed
v1.18.0-2-gf0bfcccce: digest: sha256:a8defaa979650baea27a437318a3c4cd51c44397d6e2c1910e17d81d0cde43ac size: 739
Tags used in deployment:
 - skaffold-example -&gt; aliwatters/skaffold-example:v1.18.0-2-gf0bfcccce@sha256:a8defaa979650baea27a437318a3c4cd51c44397d6e2c1910e17d81d0cde43ac
Deploy Failed. Could not connect to cluster microk8s due to &quot;https://127.0.0.1:16443/version?timeout=32s&quot;: x509: certificate signed by unknown authority (possibly because of &quot;crypto/rsa: verification error&quot; while trying to verify candidate authority certificate &quot;10.152.183.1&quot;). Check your connection for the cluster.
</code></pre>
<p>So this isn't making sense to me, the <a href="https://127.0.0.1:16443/version?timeout=32s" rel="nofollow noreferrer">https://127.0.0.1:16443/version?timeout=32s</a> is kubectl by the looks of it and it has a self-signed cert (viewed in the browser)</p>
<pre><code>$ snap version
snap    2.48.2
snapd   2.48.2
series  16
ubuntu  20.04
kernel  5.4.0-60-generic

$ snap list 
# ...
microk8s              v1.20.1                     1910   1.20/stable      canonical✓   classic
# ...

$ microk8s kubectl version
Client Version: version.Info{Major:&quot;1&quot;, Minor:&quot;20+&quot;, GitVersion:&quot;v1.20.1-34+e7db93d188d0d1&quot;, GitCommit:&quot;e7db93d188d0d12f2fe5336d1b85cdb94cb909d3&quot;, GitTreeState:&quot;clean&quot;, BuildDate:&quot;2021-01-11T23:48:42Z&quot;, GoVersion:&quot;go1.15.6&quot;, Compiler:&quot;gc&quot;, Platform:&quot;linux/amd64&quot;}
Server Version: version.Info{Major:&quot;1&quot;, Minor:&quot;20+&quot;, GitVersion:&quot;v1.20.1-34+e7db93d188d0d1&quot;, GitCommit:&quot;e7db93d188d0d12f2fe5336d1b85cdb94cb909d3&quot;, GitTreeState:&quot;clean&quot;, BuildDate:&quot;2021-01-11T23:50:46Z&quot;, GoVersion:&quot;go1.15.6&quot;, Compiler:&quot;gc&quot;, Platform:&quot;linux/amd64&quot;}

$ skaffold version
v1.18.0

$ docker version
Client: Docker Engine - Community
 Version:           19.03.4-rc1
...
</code></pre>
<p>Where do I start with debugging this?</p>
<p>Thanks for any ideas!</p>

Ali W
<p>Solved via the github issues <a href="https://github.com/GoogleContainerTools/skaffold/issues/5283" rel="nofollow noreferrer">https://github.com/GoogleContainerTools/skaffold/issues/5283</a> (thx briandealwis)</p>
<p>Combo of an alias, and an export of config was needed, so skaffold can understand the my setup.</p>
<pre><code>$ sudo snap unalias kubectl
$ sudo snap install kubectl --classic 
$ microk8s.kubectl config view --raw &gt; $HOME/.kube/config
$ skaffold dev --default-repo=&lt;your-docker-repository&gt;
</code></pre>
<p>Full output</p>
<pre><code>$ sudo snap unalias kubectl
# just in case

ali@stinky:~/git/skaffold/examples/getting-started (master)$ sudo snap install kubectl --classic 
kubectl 1.20.2 from Canonical✓ installed

ali@stinky:~/git/skaffold/examples/getting-started (master)$ which kubectl
/snap/bin/kubectl

ali@stinky:~/git/skaffold/examples/getting-started (master)$ microk8s.kubectl config view --raw &gt; $HOME/.kube/config

ali@stinky:~/git/skaffold/examples/getting-started (master)$ skaffold dev --default-repo=aliwatters
Listing files to watch...
 - skaffold-example
Generating tags...
 - skaffold-example -&gt; aliwatters/skaffold-example:v1.18.0-2-gf0bfcccce
Checking cache...
 - skaffold-example: Found Remotely
Tags used in deployment:
 - skaffold-example -&gt; aliwatters/skaffold-example:v1.18.0-2-gf0bfcccce@sha256:a8defaa979650baea27a437318a3c4cd51c44397d6e2c1910e17d81d0cde43ac
Starting deploy...
 - pod/getting-started created
Waiting for deployments to stabilize...
Deployments stabilized in 23.793238ms
Press Ctrl+C to exit
Watching for changes...
[getting-started] Hello world!
[getting-started] Hello world!
[getting-started] Hello world!
# ^C
Cleaning up...
 - pod &quot;getting-started&quot; deleted

</code></pre>
