Skip to content

Commit

Permalink
Cleanup output for DO
Browse files Browse the repository at this point in the history
  • Loading branch information
marcwickenden committed Mar 10, 2021
1 parent 7cc4964 commit bb17e60
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
24 changes: 13 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,18 +92,20 @@ kubectl --kubeconfig kubeconfig get pods

```
root@kubeletmein-vulnerable:/# kubeletmein generate
2021-03-04T23:39:46Z [ℹ] running autodetect
2021-03-04T23:39:46Z [ℹ] DigitalOcean detected
2021-03-04T23:39:46Z [ℹ] fetching kubelet creds from metadata service
2021-03-04T23:39:46Z [ℹ] writing ca cert to: ca-certificates.crt
2021-03-04T23:39:46Z [ℹ] generating bootstrap-kubeconfig file at: bootstrap-kubeconfig
2021-03-04T23:39:46Z [ℹ] wrote bootstrap-kubeconfig
2021-03-04T23:39:46Z [ℹ] using bootstrap-config to request new cert for node: kubeletmein-node
2021-03-04T23:39:46Z [ℹ] got new cert and wrote kubeconfig
2021-03-04T23:39:46Z [ℹ] now try: kubectl --kubeconfig kubeconfig get pods
root@kubeletmein-vulnerable:/# kubectl --kubeconfig kubeconfig get pods
2021-03-10T11:57:53Z [ℹ] running autodetect
2021-03-10T11:57:53Z [ℹ] DigitalOcean detected
2021-03-10T11:57:53Z [ℹ] fetching kubelet creds from metadata service
2021-03-10T11:57:53Z [ℹ] generating bootstrap-kubeconfig file at: bootstrap-kubeconfig.yaml
2021-03-10T11:57:53Z [ℹ] wrote bootstrap-kubeconfig
2021-03-10T11:57:53Z [ℹ] using bootstrap-config to request new cert for node: kubeletmein-pool-87nm2
2021-03-10T11:57:53Z [ℹ] Using bootstrap kubeconfig to generate TLS client cert, key and kubeconfig file
2021-03-10T11:57:53Z [ℹ] Waiting for client certificate to be issued
2021-03-10T11:57:53Z [ℹ] got new cert and wrote kubeconfig
2021-03-10T11:57:53Z [ℹ] now try: kubectl --kubeconfig kubeconfig.yaml get pods
root@kubeletmein-vulnerable:/# kubectl --kubeconfig kubeconfig.yaml get pods
NAME READY STATUS RESTARTS AGE
kubeletmein-vulnerable 1/1 Running 0 6m12s
kubeletmein-vulnerable 1/1 Running 0 2m30s
```

## Testing
Expand Down
2 changes: 1 addition & 1 deletion pkg/do/do.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func Generate(c *config.Config) error {
c.NodeName = nodeName
}

logger.Info("using bootstrap-config to request new cert for node: %v", c.NodeName)
logger.Info("using %s to request new cert for node: %v", c.BootstrapConfig, c.NodeName)
logger.Debug("using bootstrap-config: %v and targeting kubeconfig file: %v", c.BootstrapConfig, c.KubeConfig)
err := bootstrap.LoadClientCert(context.TODO(), c.KubeConfig, c.BootstrapConfig, c.CertDir, types.NodeName(c.NodeName))
if err != nil {
Expand Down

0 comments on commit bb17e60

Please sign in to comment.