Install and use multiple versions of pharos-cluster and the compatible tools such as kubectl for each.
chpharos
has been heavily inspired by the Ruby version switcher chruby
.
- A shell compatible with bash version 3 or newer
- A tool for downloading files (currently supported: curl and wget, usually already installed on compatible systems)
- File checksum verification tool shasum, usually already installed on compatible systems.
Logging in is required for downloading binaries and listing versions. Methods supported for login:
You can use the interactive login prompt by using:
chpharos login
Or provide the username and password as command-line arguments by using:
chpharos login --username USERNAME --password PASSWORD
.
Use chpharos logout
to log out.
chpharos list-remote
Use chpharos list-remote --pre
to include pre-release/beta versions.
chpharos install 1.1.1
To install the latest version, use chpharos install latest
chpharos list
chpharos use 1.1.1
chpharos current
chpharos uninstall 1.1.1
To install from the command-line, use:
curl -s https://get.pharos.sh | bash
To view the installer command-line options, use:
curl -s https://get.pharos.sh | bash -s -- -h
To install using the Homebrew package manager, use:
brew install kontena/chpharos/chpharos
Then follow the instructions in the post install message to add it to your shell startup scripts.
- Download a source package from releases page
- Extract the archive and go into the extracted directory
make install
- Download the chpharos.sh
- Add a line to your shell's start-up configuration file (
.bash_profile
,.zshrc
, ..) to load it:source <path-to-chpharos.sh>
mkdir -p ~/.pharos/chpharos && \
curl -sL https://raw.githubusercontent.com/kontena/chpharos/master/share/chpharos/chpharos.sh > ~/.pharos/chpharos.sh && \
echo "source ~/.pharos/chpharos.sh" >> ~/.bash_profile
chpharos
can be used in an automatic mode where switching to a directory or a git-repository that contains a .pharos-version
file will automatically switch to the version specified in the file.
To enable this, you need to add a line in your start-up scripts after the loading of pharos.sh
:
chpharos auto
echo "chpharos auto" >> ~/.bash_profile
You can use chpharos use --local 1.1.1
to create a .pharos-version
file in the current directory or chpharos use --default 1.1.1
to set a default version by creating a .pharos-version
file in the $HOME
directory.
- Download the bash-completion.sh
- Place the file into the completion configuration directory on your machine or add a line to your shell's start-up configuration file (
.bash_profile
,.zshrc
, ..) to load it:source <path-to-bash-completion.sh>
You can use the chpharos-exec
command to execute specified versions of pharos without sourcing the chpharos first:
$ chpharos-exec 1.3.2 pharos --version
pharos-cluster 1.3.2
$ chpharos-exec 1.3.2 kubectl version --short --client
Client Version: v1.9.3
You can make chpharos-exec
install the requested version automatically if it was not already installed. This is useful in CI/CD pipeline deployment scripts.
Add your Kontena Account token to CHPHAROS_TOKEN
secret/environment variable and use chpharos-exec -i
in your script:
curl -s https://get.pharos.sh | bash && chpharos-exec -i 1.3.2 pharos up
It's also possible to just run the installation:
chpharos-exec -i 1.3.2
Kontena Pharos is a simple, solid and certified Kubernetes distribution that just works. It is composed of the latest upstream Kubernetes with all the essential components delivering a robust foundation that works at any scale. It is open source under Apache 2 license and free for any purpose: personal or commercial.
Pharos Cluster is a Kontena Pharos (Kubernetes distribution) management tool. It handles cluster bootstrapping, upgrades and other maintenance tasks via SSH connection and Kubernetes API access.
Found a bug? Suggest a feature? Have a question? Please submit an issue or email us at info@kontena.io.
Follow us on Twitter: @KontenaInc.
Slack: Join the Kontena Community Slack channel.
Kontena chpharos is licensed under the Apache 2 License, Version 2.0. See LICENSE for full license text.