Skip to main content

No project description provided

Project description

OKS-CLI

Project Incubating

Kubernetes


๐ŸŒ Links


๐Ÿ“„ Table of Contents


๐Ÿงญ Overview

OKS-CLI is a command-line interface that allows you to deploy and manage Kubernetes clusters on top of OUTSCALE infrastructure.


โœ… Requirements

  • Python 3.11 or later
  • pip (Python package manager)
  • kubectl (required for commands that interact with the Kubernetes API)

๐Ÿ“ฆ Installation

Standard Installation

# Create and activate a virtual environment
python -m venv venv
source venv/bin/activate

# Install the CLI
pip install oks-cli

# Check version of oks-cli
oks-cli version

๐Ÿš€ Usage

Display all available commands:

oks-cli fullhelp

Commands

Command Description
profile list List existing profiles
profile add Add AK/SK or username/password new profile
profile delete Delete a profile by name
profile update Update an existing profile
project list List all projects
project create Create a new project
project get Get default project or the project by name
project update Update a project by name
project delete Delete a project by name
project login Set a default project by name
project logout Unset default project
project quotas Get project quotas
project snapshots Get project snapshots
project publicips Get project public ips
cluster list List all clusters
cluster create Create a new cluster
cluster get Get a cluster by name
cluster update Update a cluster by name
cluster upgrade Upgrade a cluster by name
cluster delete Delete a cluster by name
cluster login Set a default cluster
cluster logout Unset default cluster
cluster kubeconfig Fetch the kubeconfig for a cluster
cluster kubectl Fetch kubeconfig and run kubectl against it
cluster nodepool list List nodepools in the specified cluster
cluster nodepool create Create a new nodepool in the cluster
cluster nodepool delete Delete a nodepool by name from the cluster
cache clear Clear cache
cache kubeconfigs List cached kubeconfigs
quotas Get quotas
fullhelp Display detailed help information for all commands
version Show the current CLI version
install-completion Install shell completion scripts

Examples

# List all projects
oks-cli project list

# Dry run project creation
oks-cli project create --project-name my-project --description "Test project" --dry-run

# Dry run cluster creation
oks-cli cluster create \
  --cluster-name my-cluster \
  --project-name my-project \
  --description "My test cluster" \
  --version "1.32" \
  --dry-run

# Set a default project profile
oks-cli project login --project-name my-project

๐Ÿ›  Development

Editable Mode

Install the CLI in editable mode with development dependencies

# Clone the repository
git clone https://github.com/outscale/oks-cli.git
cd oks-cli

# Create and activate a virtual environment
python -m venv venv
source venv/bin/activate

# CLI in editable mode
pip install -e ".[dev]"

Changes in the oks_cli/ directory will be immediately reflected without reinstalling.

Tests

Run the test suite using pytest to ensure code correctness and stability:

pytest

Project Structure

oks-cli/
โ”œโ”€โ”€ oks_cli/              # Source code
โ”‚   โ”œโ”€โ”€ cache.py
โ”‚   โ”œโ”€โ”€ cluster.py
โ”‚   โ”œโ”€โ”€ main.py
โ”‚   โ”œโ”€โ”€ profile.py
โ”‚   โ”œโ”€โ”€ project.py
โ”‚   โ”œโ”€โ”€ quotas.py
โ”‚   โ””โ”€โ”€ utils.py
โ”œโ”€โ”€ setup.py              # Packaging configuration
โ”œโ”€โ”€ requirements.txt      # Dependencies
โ””โ”€โ”€ README.md             # Project documentation

Dependencies

Dependencies are managed via setup.py and requirements.txt.

To reinstall or update:

pip install -e .

๐Ÿค Contributing

OKS-CLI is open source software licensed under BSD-3-Clause.

We welcome contributions! Please see CONTRIBUTING.md for guidelines and instructions.


๐Ÿ“œ License

BSD-3-Clause ยฉ Outscale SAS


๐Ÿ†˜ Support

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

oks_cli-1.15.tar.gz (31.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

oks_cli-1.15-py3-none-any.whl (28.1 kB view details)

Uploaded Python 3

File details

Details for the file oks_cli-1.15.tar.gz.

File metadata

  • Download URL: oks_cli-1.15.tar.gz
  • Upload date:
  • Size: 31.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for oks_cli-1.15.tar.gz
Algorithm Hash digest
SHA256 88028fdfbd849fbd6fd8bcd4e9def109b19e109a5fd64e0ca5fcab06941c9ff2
MD5 72bbb063ac3f81ee3a2e87956fc2d8b2
BLAKE2b-256 cb9908540feb2def16ed5629716d6d89bb5557a21c0a239cb571b519c927b04a

See more details on using hashes here.

File details

Details for the file oks_cli-1.15-py3-none-any.whl.

File metadata

  • Download URL: oks_cli-1.15-py3-none-any.whl
  • Upload date:
  • Size: 28.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for oks_cli-1.15-py3-none-any.whl
Algorithm Hash digest
SHA256 f173c864881d2727cc57e6bb96123c7093f5d0738e147f33f017dd6ed1d16e38
MD5 e4506c1bb433fafbec99d05c5283dd69
BLAKE2b-256 2b631899f35f5842d6c0e34e77442f544caf5de4b740d1f145e21acb1f3ce3b3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page