Git Product home page Git Product logo

cli's Introduction

civo

cli's People

Contributors

alejandrojnm avatar alessandroargentieri avatar andyjeffries avatar beret avatar dependabot[bot] avatar dibia27 avatar dmajrekar avatar donnmyth avatar haardikdharma10 avatar helper-uttam avatar i-am-yuvi avatar johannestegner avatar kaihoffman avatar kameshsampath avatar martynbristow avatar myishay avatar pradumnasaraf avatar protosam avatar realharshthakur avatar saiyam1814 avatar saptarshisarkar12 avatar satakshigarg avatar shanmukhkotharu avatar shubhamtatvamasi avatar ssmiller25 avatar stiantoften avatar subhasmitasw avatar uzaxirr avatar vishalanarase avatar zulh-civo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cli's Issues

Add merge option to create

Would be good to set both the config save and merge flags during create, at the moment only save is possible.

e.g

civo kubernetes create --wait --save --merge

civo-0.7.8-darwin-arm64.tar.gz : dyld: Symbol not found: _clock_gettime

Can not upgrade from

./civo version
Civo CLI v0.7.5

to 0.7.8-darwin

get error:

./civo
dyld: Symbol not found: _clock_gettime
Referenced from: /xxx/xxx/tmp/civo-test/078/./civo
Expected in: flat namespace

Trace/BPT trap: 5

Civo CLI v0.7.5 is the latest version its possible to run. (Also tested 0.7.7 and 0.7.6 with the same result)

Include the kubectl binary in the civo cli docker image

People like me don't prefer installing the cli directly on the host. The docs of using cli in docker are great but fall short when it comes to merging kubeconfig.

Having kubectl inside the image will have too major benefits

  • Ability to run the civo kubernetes config my-first-cluster -s --merge from within docker.
  • Users will be able to interact with the civo k3s cluster without having to setup kubectl themselves

Add check in creating a firewall rule

The problem was reported by user, that created a rule and in the address put something different from inbound or outbound, and the cli did not verify if the value was valid.

https://github.com/civo/cli/blob/master/cmd/kubernetes_create.go

Hi, I created 51 clusters in sequence, without being notified of having exceeded any limits.
Is this by design?
Should I not get notified by the API?
From my end, I assumed I would be met with a message indicating that I exceeded my limits.

Kindly see the output of my attempt below.

root@Pegasus:/home/manuelh# ./test.sh
The cluster manueltest0 (9ee5f513-3d09-4bf3-808d-18ccc775bf1d) has been created
The cluster manueltest1 (a5080341-b6b3-48f3-920a-56fbae000ae7) has been created
The cluster manueltest2 (5278b8b3-4e6a-4b88-ba82-0cfc0e803a9a) has been created
The cluster manueltest3 (12a85bd3-4002-43f4-a16f-9320e4893ba7) has been created
The cluster manueltest4 (4d427f6f-604d-477b-a2e9-3e2f80e2bb0d) has been created
The cluster manueltest5 (44ac9be3-f432-468d-a2e5-a12aef43dac7) has been created
The cluster manueltest6 (1ede3310-be8e-49e5-80e6-325594e1c753) has been created
The cluster manueltest7 (13a3adfb-3b2f-41ab-a5f3-e26da782bc4e) has been created
The cluster manueltest8 (e490e768-9342-4494-8860-2ad9947f9feb) has been created
The cluster manueltest9 (2115b299-3c98-412a-8f85-8ac9fda057be) has been created
The cluster manueltest10 (ed28e54e-8b0c-43cc-9d7d-fa188289faec) has been created
The cluster manueltest11 (54428a31-d640-4f54-9c31-a3d86fb1e066) has been created
The cluster manueltest12 (ded857a2-b1a2-43fa-a76e-3c12760c5743) has been created
The cluster manueltest13 (3d21550b-6917-4d3e-93a4-aefe1f56f6f6) has been created
The cluster manueltest14 (e550cd90-aad3-449e-9f45-a1afc74e8757) has been created
The cluster manueltest15 (ce11141c-654c-4416-a716-790e7ff8ffb2) has been created
The cluster manueltest16 (76921e80-063e-49c1-8762-7a26dd04837e) has been created
The cluster manueltest17 (5fbd2ac7-8172-4dbf-9891-9a4ab12d729d) has been created
The cluster manueltest18 (59cabb0b-d102-4a34-95f3-75dad2a9ebc9) has been created
The cluster manueltest19 (14492526-bdcd-47f5-b5bb-ba94f00201a1) has been created
The cluster manueltest20 (59ac2c4f-50cc-45c3-8f01-2e79c211859b) has been created
The cluster manueltest21 (cbe45ee4-6692-489d-9701-0b3cedbeb626) has been created
The cluster manueltest22 (9f048bc0-813d-4f60-8b86-e734bfbb1c14) has been created
The cluster manueltest23 (f81261f1-d17d-4aff-bfb7-d77fa9ec3dd8) has been created
The cluster manueltest24 (ed9b818c-8721-49de-aeeb-13245849e496) has been created
The cluster manueltest25 (5e3aa75c-6e62-4bd2-8d82-3f0cc0ee8f7e) has been created
The cluster manueltest26 (c976cbb6-afc5-48a3-86c8-455ed88473c1) has been created
The cluster manueltest27 (aa1ddfb1-1178-4fb1-9e20-5d55112cecc8) has been created
The cluster manueltest28 (373b829c-35de-44aa-a6c1-59e02a7e0ac0) has been created
The cluster manueltest29 (52f4404a-4da9-48fa-93b0-f2f16286f0ed) has been created
The cluster manueltest30 (ae71e4b9-8542-4ba8-ae7e-75e04192006c) has been created
The cluster manueltest31 (cbb06046-2db2-4529-8b31-1cd93fe20ec7) has been created
The cluster manueltest32 (4a15c5a8-a6e6-4e9c-8385-2634c82c71f0) has been created
The cluster manueltest33 (6b85c691-db6d-41a6-822b-6f871b2fd4bc) has been created
The cluster manueltest34 (99b78f8b-627b-4592-9d09-3e4b40bb4bb6) has been created
The cluster manueltest35 (07448609-5963-4298-8809-4b0e4a097303) has been created
The cluster manueltest36 (16d0a5b7-c83d-47a9-8ae8-01631d39a7b7) has been created
The cluster manueltest37 (654b9ede-a31b-4d05-addd-43e89147e549) has been created
The cluster manueltest38 (423fb82d-a4f3-419e-a823-08bf67e85b16) has been created
The cluster manueltest39 (dd6ce640-ef09-4f93-919b-c922af7aa63d) has been created
The cluster manueltest40 (96297df2-13ee-4760-915f-8368e19f8420) has been created
The cluster manueltest41 (092ffe51-8829-4fe4-910b-380f6e7e5d46) has been created
The cluster manueltest42 (51a21788-d437-433b-bb4b-654b09a61ff7) has been created
The cluster manueltest43 (8d34f6e1-aa7f-40d0-9e23-eb9e7ebd340b) has been created
The cluster manueltest44 (d78b980e-71ab-411a-b15c-088f9e88cfb9) has been created
The cluster manueltest45 (792b2aa6-351a-4936-b06a-f54fd7813c1c) has been created
The cluster manueltest46 (89c2821a-0882-4ef3-aeb3-9dd14ff62947) has been created
The cluster manueltest47 (11fdfe67-98e8-437a-b0eb-7347e20edef7) has been created
The cluster manueltest48 (cd519175-60eb-4874-b01d-0247eac8e0a6) has been created
The cluster manueltest49 (66e9114a-b9b5-4e7e-b634-e94bbe69cf2c) has been created
The cluster manueltest50 (b66389bf-fb86-479f-880f-c4a2d54b5f00) has been created

--
Thanks again for your time.

Regards,
Manuel

`civo apikey save` stores API key in a world-readable file.

Using civo apikey save to save an API key creates a .civo.json file that is world readable:

hostname ~ $ ls -l ~/.civo.json
-rw-r--r--  1 user  group  234  5 Nov 13:45 /Users/user/.civo.json

At the very least that file should not have read permissions for the group and others, like this:

hostname ~ $ chmod go-r .civo.json
hostname ~ $ ls -l ~/.civo.json
-rw-------  1 user  group  234  5 Nov 13:45 /Users/user/.civo.json

Missing Region Information (Bug|Question)

When using the civo CLI, it will default to region (nyc1) which means for legacy instances and clusters, you get no data, without informing the user.

Question:
What should the correct behavior be?

  • Should it default to NYC1? - As a user I'd expect an ls to return all resources across all regions
  • How should the user supply the region. Its not mentioned in the README, I'd happily submit a PR but I'm not sure how it would convey it best

Install-script not working

I get this message when I run curl -sL https://civo.com/get | sh.

============================================================
  The script was run as a user who is unable to write
  to /usr/local/bin. To complete the installation the
  following commands may need to be run manually.
============================================================

  sudo cp cli-linux /usr/local/bin/cli

sudo doesn't change the result.
The manual command also doesn't work (no cli-linux).

OS: Kubuntu 20.04

Deletion checks should happen after finding and confirm the instance

$ civo k3s ls
+--------------------------------------+------------+------+-----------+--------+
| ID                                   | Name       | Node | Size      | Status |
+--------------------------------------+------------+------+-----------+--------+
| 6f8a07ff-2c3e-4b93-83fb-7f82a412be12 | calm-frost |    3 | g2.medium | ACTIVE |
+--------------------------------------+------------+------+-----------+--------+
$ civo k3s rm calm-frots
Warning: Are you sure you want to delete this kubernetes cluster (y/N) ?

Here I misspelt calm-frost and it a)wanted me to confirm deleting a cluster that actually doesn't exist and b) should really confirm the name:

$ civo k3s rm calm-frots
Error: Couldn't find a cluster named calm-frots
$ civo k3s rm calm-frost
Warning: Are you sure you want to delete the kubernetes cluster calm-frost (y/N) ?

Default to case insensitive in instance/cluster/apikey/etc names

This is from feedback by a user completing KubeQuest, and I think it's a good one.

Would it be possible to have CLI commands not care about case in input? So that if you had a cluster called My-Kubernetes-Cluster, it would be found with civo k8s show my-kubernetes-cluster as well as specific capitalization.

I don't know how hard it is to implement in Golang, but having it at least as an option would be great IMO

Change default behavior of k8s config save.

In the current implementation, you are required to use the --merge (-m) flag if you wish that the civo kubernetes config --save command merges the configuration.
For people who have used the CLI for a while, this is not a huge issue as we know about it, but I have noticed that people that are new to using it (just as with me when I first tried it out), this is missed.

I propose that one of the following changes are made to the behavior:

Alt 1. --merge is used by default, and a --replace flag is added for people who really don't want to keep their configuration.

Alt 2. A confirmation mentioning that the old configuration will be deleted.

Neither of the above would be such a breaking change that people would have issues with using the cli and it would be a lot "safer" for new users.

Feature request: region selection

Feature request:
Region listing is possible, we should be able to select/set the defaul region too :-)

civo region ls

for example

civo region set NYC1

Does a generic region selection needed to be added to all the create commands too?

e.g

civo kubernetes create mycluster --region=NYC1 --size=g2.large --nodes=3 

Support for creating clusters without default apps like traefik

In order to create a cluster without the default ingress controller traefik, a command line switch like --remove-applications=traefik or --without-ingress would be helpful, especially in cases where I would like to use a different ingress controller. Currently, this is possible through the web interface by deselecting a default app (traefik or metrics-server).

Should civo decide to bundle more applications into the default cluster creation step, such a flag would give the developer more control over the creation process.

Alternatively, a more inclusive approach would work as well like --with-application=none defaulting to --with-application=traefik,metrics-server.

Installing app scales cluster to zero

@mciverza wrote in civo/kube100#62

after launching a cluster, manually adding an application via CLi scales the cluster to zero
It might also be true via WebUI, but I have not yet tested it

2021-02-11_08-00-civo-app-scales-cluster

obtained by creating cluster via CLi,

civo k3s create tinytest3 -s g2.small --nodes 2 -r traefik

waiting until cluster is green

civo k3s list

and then adding Nginx

civo k3s applications add Nginx -c tinytest3

shown by again running

civo k3s list

Readme (Domain Details section)

The CLI command for listing DNS records for a domain has a small error - there should be a space;
civo domainrecord list domain.name should be civo domain record list domain.name.

API Keys ls shouldn't show the actual key

Every time I run civo apikeys ls to check I'm using the right key, it shows the actual API keys and I think "Wow, if I was recording a screencase right now, I'd have shared some pretty secret API keys".

So I think civo apikeys ls should only show the Name and Default column, and maybe have a civo apikey show command that shows the actual key for the specified key (or current key if one isn't specified).

can't merge kube config

Using the cli command

civo k3s config cluster-name --save --merge

don't work and returns an error:

Error: Saving the cluster config failed with could not merge kubeconfigs: exit status 1

(from civo/kube100#36)

Upgrade the cli to cobra v1.1.0

This will allow us to implement autocompletion, even from the server side, so the user does not need to know the name of the resources, if this option is enabled, you can use the tab to get all the resources from the api.

Error Message On k3s cluster Creation

Received the following error message. This happend around 14:48 UTC. Cluster creation started around 14:40. The cluster did eventually come up. I'll leave cluster up over the weekend if that would be helpful.

Creating k8s-intro
Creating a 3 node k3s cluster of g2.small instances called k8s-intro... / panic: interface conversion: error is *url.Error, not civogo.HTTPError

goroutine 1 [running]:
github.com/civo/civogo.decodeERROR(0xad0e40, 0xc00015f920, 0x17, 0x0)
	/home/runner/go/pkg/mod/github.com/civo/[email protected]/errors.go:279 +0x11580
github.com/civo/civogo.(*Client).ListKubernetesClusters(0xc000033200, 0x24, 0xc000408180, 0x24)
	/home/runner/go/pkg/mod/github.com/civo/[email protected]/kubernetes.go:128 +0x1fd
github.com/civo/civogo.(*Client).FindKubernetesCluster(0xc000033200, 0xc000408180, 0x24, 0xc0001f5a38, 0x0, 0x0)
	/home/runner/go/pkg/mod/github.com/civo/[email protected]/kubernetes.go:141 +0x43
github.com/civo/cli/cmd.glob..func41(0xe84e40, 0xc0000756e0, 0x1, 0x6)
	/home/runner/work/cli/cli/cmd/kubernetes_create.go:99 +0x4eb
github.com/spf13/cobra.(*Command).execute(0xe84e40, 0xc000075680, 0x6, 0x6, 0xe84e40, 0xc000075680)
	/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:846 +0x2aa
github.com/spf13/cobra.(*Command).ExecuteC(0xe88800, 0x43b8aa, 0xe477c0, 0xc000054750)
	/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:950 +0x349
github.com/spf13/cobra.(*Command).Execute(...)
	/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:887
github.com/civo/cli/cmd.Execute()
	/home/runner/work/cli/cli/cmd/root.go:26 +0x31
main.main()
	/home/runner/work/cli/cli/main.go:23 +0x20
make: *** [Makefile:41: kubeconfig.k8s-intro] Error 2

civo kubernetes config fails when .kube directory does not exist

I encountered it in a github runner for CI where this can be fairly common issue. Creating $HOME/.kube directory beforehand solves the issue.

The command fails with:

Error: open /home/runner/.kube/config: no such file or directory
Error: Saving the cluster config failed with open /home/runner/.kube/config: no such file or directory

Access your cluster with:
kubectl get node

overwriting kubeconfig by default

Civo CLi seems to want to override kubeconfig by default now.
it should not update Kubeconfig, unless --switch and/or --merge are specified:

e.g

civo@krew:~$ civo k3s create kickit5  --nodes 2
Warning: Are you sure you want to overwrite the kubernetes config (y/N) ? y

Allow switching instance back to using default firewall

This came through as a customer query.

The web panel allows users to switch instances back to use the default firewall. The CLI does not allow for a switch back to Default, only from Default to a new firewall, or between two named user-created firewalls.

When I do civo firewall list the default firewall (or anything referring to it is not shown on the CLI).

Not all custom fields work

If you run civo instance show NAME -o custom -f OpenstackServerID

Expect: 7d3d1cc8-b687-4e14-a29e-a1689be93c94

Got: OpenstackServer33da49be-a9a5-401a-80cf-3e6483cfc476

What happened is that it found the word "ID" first and replaced that. So when looking for fields to replace, it should use the longest field names first and go down the list of field names getting shorter. E.g. look for "OpenstackServerID" to replace before looking for "ServerID", and before looking for any remaining "ID" occurrences.

Native Apple Silicon Compatibility (arm64-darwin)

On Apple Silicon/ARM64, the https://civo.com/get script properly identifies the platform, but the target package has not been built. (https://github.com/civo/cli/releases/download/v0.7.5/civo-0.7.5-darwin-arm.tar.gz) I have not tested with homebrew, though I suspect it properly falls back to the amd64 packages.

To install on Apple Silicon, amd64 builds can of course be manually downloaded and run through Rosetta. This revision to the script invocation also overrides arch detection: curl -sL https://civo.com/get | arch -x86_64 sh

Go release 1.16 (February 2021) adds support of 64-bit ARM architecture on macOS (Apple Silicon) via the GOOS=darwin and GOARCH=arm64
https://tip.golang.org/doc/go1.16#darwin

("Universal binaries" are not yet supported by the Go build process.)

Civo apikey add yields Go nil assignment panic on Ubuntu 20.04 Focal Release on Docker

Repo steps:

  1. Install Ubuntu 20.04 Focal Release as guest OS on host OS Windows 10.
  2. Install Docker per official instructions docker version at time of writing is 19.03.11
  3. Follow "Docker Usage" steps as instructed per Read Me put the civo alias in ~./bashrc file
  4. Attempt to add an API key as instructed in API Keys section of Read Me

Performing the above steps yields the following stack trace:

civo apikey add Demo <api key>
EOF
panic: assignment to entry in nil map

goroutine 1 [running]:
github.com/civo/cli/cmd.glob..func4(0xd6a2e0, 0xc00000cdc0, 0x2, 0x2)
	/home/runner/work/cli/cli/cmd/apikey_save.go:17 +0x8b
github.com/spf13/cobra.(*Command).execute(0xd6a2e0, 0xc00000cd80, 0x2, 0x2, 0xd6a2e0, 0xc00000cd80)
	/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:846 +0x2aa
github.com/spf13/cobra.(*Command).ExecuteC(0xd65180, 0x43b4da, 0xd26be0, 0xc00002c750)
	/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:950 +0x349
github.com/spf13/cobra.(*Command).Execute(...)
	/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:887
github.com/civo/cli/cmd.Execute()
	/home/runner/work/cli/cli/cmd/root.go:26 +0x31
main.main()
	/home/runner/work/cli/cli/main.go:23 +0x20

CLi saves context incorrectly as "default" in NYC

The kubeconfig file for clusters in NYC is different.

Note that the two clusters referenced below are on different K3s versions. I will upgrade and re-test

E.g output for a cluster in SVG1:

civo@krew:~$ civo k3s show observe4
          ID : f3abcc09-4a4e-4b0f-a74e-8b9e0a71c323
        Name : observe4
       Nodes : 1
        Size : g2.medium
      Status : ACTIVE
     Version : 1.18.6+k3s1 *

civo k3s config observe4

apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: <snip>
    server: https://185.136.235.229:6443
  name: observe4
contexts:
- context:
    cluster: observe4
    user: observe4
  name: observe4
current-context: observe4
kind: Config
preferences: {}
users:
- name: observe4
  user:
    password: <snip>
    username: <snip>

whereas in NYC

civo@krew:~$ civo k3s show testcli06
          ID : ae1c1bad-174b-4f93-ab9d-514aba8c1165
        Name : testcli06
       Nodes : 2
        Size : g3.medium
      Status : ACTIVE
     Version : 1.20.0-k3s2
civo@krew:~$ civo k3s config testcli06
apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: <snip>
    server: https://212.2.243.66:6443
  name: default
contexts:
- context:
    cluster: default
    user: default
  name: default
current-context: default
kind: Config
preferences: {}
users:
- name: default
  user:
    client-certificate-data: <snip>
    client-key-data: <snip>

It would be nice to able to view a applications post install instructions from the CLI

It would be nice to be able to view an applications post_install.md instructions from the cli after adding an application to your cluster

I would see it being another option on the applications command e.g. civo k8s applications post-install-docs <app-name>

I found this library that could maybe be used https://github.com/MichaelMure/go-term-markdown?

I am happy to look at creating a PR for this if you think this would be a good idea?

Quota show output isn't helpful

civo quota show

This currently shows in a hugely wide table, which is horrible for trying to view the details. Should be listed in a Key:Value format (like instance show)

Also as there's only one command for civo quota maybe we just make that command civo quota do a show, rather than have a subcommand for show.

Error: Error checking availability ZeroMatchesError: unable to find SGV1, zero matches

Hello, I'm trying to demonstrate the k3s cluster setup using the k3sup tool but I'm getting the following error, what am I doing wrong here, thank you.

$ civo instance create --hostname k3sup-1.demo --sshkey cf782af6-6c36-4af0-bd4b-f4c4bfdda2a0 --template 811a8dfb-8202-49ad-b1ef-1e6320b20497 --region NYC1 --size g3.small --wait

Error: Error checking availability ZeroMatchesError: unable to find SGV1, zero matches

Feature request: auto complete

Being a Linux user I miss auto completion of options with tab.

It will be great if Civo CLI can auto complete like most of the Linux commands does. It will help in lesser human errors while performing different operations using CLI.

civo kubernetes config fails

I tried getting the kubernetes context but the command fails with:

civo kubernetes config <cluster> --merge --switch --save
Merged with main kubernetes config: C:\Users\Username/.kube/config
Error: Saving the cluster config failed with could not remove temporary kubeconfig file: C:\Users\Username\AppData\Local\Temp\civo-temp-311490687, exit status 1

The kubeconfig file was not updated and the temporary file contains only the downloaded cluster information.

Unable to install app via CLI

@alejandrojnm, when I try to install WordPress app from Civo CLI (civo k8s apps add Wordpress:5GB [--cluster my-cluster]), I got this error:

The application was installed in the Kubernetes cluster

I retry it in new clusters as well but the error persist. But when I switched to Civo web UI, I'm able to install it just fine.

I'm not quite sure if the problem was originated from a piece of code in this repository OR it's from Civo back-end. Something for us to investigate and fix.

node size ignored by CLi (for NYC1)

When creating cluster using CLi, using region NYC1, the node size is ignored and clusters are always created as with size "medium"

When using WebUI, it creates the cluster with the selected size.

civo@krew:~$ civo k3s create testcli01 -s g2.small --nodes 2 -r traefik 
The cluster testcli01 (3f00d4e4-2b95-48d7-8268-6d0c70cb971a) has been created

civo@krew:~$ civo k3s show testcli01
          ID : 3f00d4e4-2b95-48d7-8268-6d0c70cb971a
        Name : testcli01
       Nodes : 2
        Size : g3.medium
      Status : BUILDING
     Version : 1.20.0-k3s2
API Endpoint : 
   Master IP : 
DNS A record : 3f00d4e4-2b95-48d7-8268-6d0c70cb971a.k8s.civo.com


UnknownError when listing instances and no instances exist

When running instance ls, I get an UnknownError:

% civo --region NYC1 instance ls
Error: UnknownError

I used mitmproxy to understand what was going on. The HTTP request that civo makes is:

GET /v2/instances?page=1&per_page=99999999&region=NYC1 HTTP/1.1
Host: api.civo.com
User-Agent: civogo/0.2.21
Accept: application/json
Authorization: bearer redacted
Content-Type: application/json
Accept-Encoding: gzip

and the response is:

HTTP/1.1 200 OK
Date: Wed, 03 Mar 2021 17:09:19 GMT
Content-Type: application/json; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-Download-Options: noopen
X-Permitted-Cross-Domain-Policies: none
Referrer-Policy: strict-origin-when-cross-origin
X-RateLimit-Limit: 50
X-RateLimit-Remaining: 48
ETag: W/"c36c6615f45d86a1351e8eb57f6c8df2"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: ee85b170e9f92c2c3c4fd52c87410d8d
X-Runtime: 1.324644
Vary: Origin
X-RateLimit-Reset: 1614791400
Strict-Transport-Security: max-age=15724800; includeSubDomains

{"page":"1","per_page":null,"pages":0,"items":[]}

Does it fail because I do not have any instances?

Aliases for `kubernetes` command

There are a number of aliases in the CLI already, but it would be great if kubernetes would be invoked with aliases e.g. k3s, k8s:

$ civo k8s show my-cluster
$ civo k3s ls

v0.7.3 cannot create cluster

civo@krew:~$ civo version
Civo CLI v0.7.3

error on trying to create

civo@krew:~$ civo k3s create kickit6
Error: You can create a cluster with this  size, you need choise one with k3s in the name

double checked with longer form:

civo@krew:~$ civo kubernetes create kickit6
Error: You can create a cluster with this  size, you need choise one with k3s in the name

Restore --wait --save --switch functionality

On the previous Ruby CLI, you could run civo kubernetes create test --wait --save --switch which would display the time the cluster took to launch, save the config (or merge if another config existed) and then switch to that context on completing.

I find it very handy to use when I create a test/demo cluster and want to immediately use it when it's ready.

Show available sizes

The CLi helpfully requires correct node size to be specified, where can the list of valid sizes be obtained?

e.g

civo@krew:~$ civo k3s create kickit5 --size k3s.small --nodes 2
Error: DatabaseServiceNotFoundError: Failed to find the size within the internal database

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.