Kubernetes (k8s) has emerged as the de facto container orchestration platform offering excellent abstraction over infrastructure. But service deployments and delivery mechanisms to k8s are still way too complex. Delivery tools should simplify things for a developer so that developers can focus on writing interesting stuff & building value. This is best achieved if all the complexity of deployment completely disappears!
HyScale is a starting point for how a simplified service spec can allow developers to easily deploy their apps to k8s without having to wade through k8s complexities and also without having to write or maintain hundreds of lines of yaml.
It offers a declarative service spec parser for k8s abstraction and the automatic generation of k8s manifests & docker files.
Here is what you need to do:
To get started, install hyscale as per the below instructions & follow the tutorial to deploy your first app.
See full documentation here.
In order to deploy your service to k8s, you must have the following configurations and installations in place on your machine from which you wish to deploy your application.
- Docker 18.09.x or above
- kube config file with the cluster token placed at $HOME/.kube/config
- Image registry credentials at $HOME/.docker/config.json (make sure
config.json
has the latest auth creds by logging into the image registry usingdocker login
prior to deployment) - Your Linux user should be part of the docker group and
docker.sock
to be present at /var/run/docker.sock (Default location)
If you do not have access to a kubernetes cluster and wish to deploy to your local machine, you could try setting up minikube or kind.
Open your terminal and enter the following:
curl -sSL http://get.hyscale.io | bash
Here is a basic service spec for deploying tomcat (without any application). For all possible options, see the spec reference.
name: myservice
image:
registry: registry.hub.docker.com/library
name: tomcat
tag: 8.5.0-jre8
volumes:
- name: tomcat-logs-dir
path: /usr/local/tomcat/logs
size: 1Gi
storageClass: standard
external: true
ports:
- port: 8080/tcp
healthCheck:
httpPath: /docs/images/tomcat.gif
To deploy, invoke the hyscale deploy command:
hyscale deploy service -f `<myservice.hspec.yaml>` -n `<my-namespace>` -a `<my-app-name>`
To view the status of your deployment:
hyscale get service status -s `<myservice>` -n `<my-namespace>` -a `<my-app-name>`
To view logs:
hyscale get service logs -s `<myservice>` -n `<my-namespace>` -a `<my-app-name>`
For all possible commands, see the command reference.
These commands have been verified on CentOS, Ubuntu and Debian Linux