Using Calyptia CLI

Note: Since Calyptia CLI v0.24 you can now install Calyptia Core into a Kubernetes cluster.

How to deploy a Calyptia Core instance to a Kubernetes Cluster

Deploying an instance of Calyptia Core with Calyptia CLI within an existing Kubernetes cluster is straightforward, the requirements are:

  1. Have a local Kubernetes configuration file available for the cluster you want to deploy to.
  2. Configure Calyptia CLI with a project token. Installation and Deployment

Create a core instance with the latest version using the following command:

calyptia create core_instance kubernetes

If you need a specific version then this can be specified:

calyptia create core_instance kubernetes --version v0.2.4

The list of available options for this command are:

Setup a new core instance on Kubernetes

Usage:
  calyptia create core_instance kubernetes [flags]

Aliases:
  kubernetes, kube, k8s

Flags:
      --environment string                  Calyptia environment name or ID
  -h, --help                                help for kubernetes
      --kube-as string                      Username to impersonate for the operation
      --kube-as-group stringArray           Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
      --kube-as-uid string                  UID to impersonate for the operation
      --kube-certificate-authority string   Path to a cert file for the certificate authority
      --kube-client-certificate string      Path to a client certificate file for TLS
      --kube-client-key string              Path to a client key file for TLS
      --kube-cluster string                 The name of the kubeconfig cluster to use
      --kube-context string                 The name of the kubeconfig context to use
      --kube-insecure-skip-tls-verify       If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure
  -n, --kube-namespace string               If present, the namespace scope for this CLI request
      --kube-password string                Password for basic authentication to the API server
      --kube-proxy-url string               If provided, this URL will be used to connect via proxy
      --kube-request-timeout string         The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0")
      --kube-server string                  The address and port of the Kubernetes API server
      --kube-tls-server-name string         If provided, this name will be used to validate server certificate. If this is not provided, hostname used to contact the server is used.
      --kube-token string                   Bearer token for authentication to the API server
      --kube-user string                    The name of the kubeconfig user to use
      --kube-username string                Username for basic authentication to the API server
      --name string                         Core instance name (autogenerated if empty)
      --no-healthcheck-pipeline             Disable health check pipeline creation alongside the core instance
      --tags strings                        Tags to apply to the core instance
      --version string                      Core instance version (latest is the default)

An example usage of this command, can be seen here:

asciicastasciicast

As you can see it will generate a core instance in the default namespace with a random name but you can also define the Kubernetes namespace or the core instance name giving the following attributes --kube-namespace and --name options.

asciicastasciicast

To view all existing core instances (in the default namespace):

calyptia get core_instances

How to delete a Calyptia Core instance from a Kubernetes Cluster

To remove a Calyptia Core instance you can delete it with the following command (use the appropriate flags to specify Kubernetes namespace if required):

calyptia delete core_instance kubernetes instance-name

An example usage of this command, can be seen here:

asciicastasciicast

The list of options for this command are as follows:

Delete a core instance from kubernetes

Usage:
  calyptia delete core_instance kubernetes CORE_INSTANCE [flags]

Aliases:
  kubernetes, kube, k8s

Flags:
  -h, --help                                help for kubernetes
      --kube-as string                      Username to impersonate for the operation
      --kube-as-group stringArray           Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
      --kube-as-uid string                  UID to impersonate for the operation
      --kube-certificate-authority string   Path to a cert file for the certificate authority
      --kube-client-certificate string      Path to a client certificate file for TLS
      --kube-client-key string              Path to a client key file for TLS
      --kube-cluster string                 The name of the kubeconfig cluster to use
      --kube-context string                 The name of the kubeconfig context to use
      --kube-insecure-skip-tls-verify       If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure
  -n, --kube-namespace string               If present, the namespace scope for this CLI request
      --kube-password string                Password for basic authentication to the API server
      --kube-proxy-url string               If provided, this URL will be used to connect via proxy
      --kube-request-timeout string         The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0")
      --kube-server string                  The address and port of the Kubernetes API server
      --kube-tls-server-name string         If provided, this name will be used to validate server certificate. If this is not provided, hostname used to contact the server is used.
      --kube-token string                   Bearer token for authentication to the API server
      --kube-user string                    The name of the kubeconfig user to use
      --kube-username string                Username for basic authentication to the API server
      --skip-error                          Skip errors during delete process
      --yes

Updating an existing instance

You can update the version and name of an already deployed instance with the following command:

calyptia update core_instance kubernetes old-name --new-name name --new-version v0.2.5

The list of options are as follows:

update a core instance from kubernetes

Usage:
  calyptia update core_instance kubernetes CORE_INSTANCE [flags]

Aliases:
  kubernetes, kube, k8s

Flags:
  -h, --help                                help for kubernetes
      --kube-as string                      Username to impersonate for the operation
      --kube-as-group stringArray           Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
      --kube-as-uid string                  UID to impersonate for the operation
      --kube-certificate-authority string   Path to a cert file for the certificate authority
      --kube-client-certificate string      Path to a client certificate file for TLS
      --kube-client-key string              Path to a client key file for TLS
      --kube-cluster string                 The name of the kubeconfig cluster to use
      --kube-context string                 The name of the kubeconfig context to use
      --kube-insecure-skip-tls-verify       If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure
  -n, --kube-namespace string               If present, the namespace scope for this CLI request
      --kube-password string                Password for basic authentication to the API server
      --kube-proxy-url string               If provided, this URL will be used to connect via proxy
      --kube-request-timeout string         The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0")
      --kube-server string                  The address and port of the Kubernetes API server
      --kube-tls-server-name string         If provided, this name will be used to validate server certificate. If this is not provided, hostname used to contact the server is used.
      --kube-token string                   Bearer token for authentication to the API server
      --kube-user string                    The name of the kubeconfig user to use
      --kube-username string                Username for basic authentication to the API server
      --new-name string                     New core instance name
      --new-version string                  New version of the calyptia-core instance

Did this page help you?