Quick Start
This quick start guide deploys an Akeyless Gateway with Secure Remote Access on Kubernetes cluster using the Akeyless CLI, this can also be achieved via Akeyless console.
For more deployment model check our Choose a deployment model guide.
Prerequisites
- Akeyless CLI installed.
- A Kubernetes Cluster
- kubectl installed context pointing to the Kubernetes Cluster
- Helm Installed
- Minimum 1 vCPU available with 2 GB RAM per resource
- The following ports need to be open on the cluster to internal network access only:
| Service | Port |
|---|---|
| Gateway Configuration Manager | 8000 |
| SSH Access | 22 |
Create an Authentication Method
In this section, we will create an Authentication Method which will be used to authenticate your Akeyless Gateway to your Akeyless account.
For this guide, API Key authentication is used for simplicity.
Note:The API Key Authentication Method is not recommended for production use. It works well for getting started with Akeyless, quick proofs of concept (POCs), and other temporary scenarios.
Run the following command to create an API Key authentication method:
akeyless auth-method create api-key --name MyFirstAPIKeyCreate an Access Role
In this section, we will create an Access Role that will be used to authorized your Gateway to execute actions in the Akeyless account.
-
Run the following command to create a new access role:
akeyless create-role --name MyFirstRole -
Set the role with access to all Items under
/path/to/folder/withReadandListpermissions:akeyless set-role-rule --role-name MyFirstRole --path "/path/to/folder/\*" --capability read --capability list -
Also, set the role with access to Targets:
akeyless set-role-rule --role-name MyFirstRole --path "/path/to/folder/\*" --rule-type target-rule --capability read --capability list -
Associate the Authentication Method with the Role:
akeyless assoc-role-am --role-name MyFirstRole --am-name MyFirstAPIKeyNow you have an Authentication Method with the right access to deploy the Gateway.
Create Your SSH Certificate Issuer
In order to create an SSH Certificates issuer, run the following commands:
-
Create a new RSA DFC Key in your Akeyless account:
akeyless create-dfc-key -n MyRSAKey -a RSA2048 -
Create the SSH Certificate Issuer:
akeyless create-ssh-cert-issuer --name your-ssh-cert-issuer-name --signer-key-name MyRSAKey --allowed-users 'ubuntu' --ttl 300
Note:This is the bare minimum required to have an SSH Certificate Issuer and access the Remote Access Portal. For more details on connecting to a resource by way of SSH, please see the docs here.
Configuration
In this section we will add the Akeyless Helm repository and configure your values.yaml before deploying the Gateway and Secure Remote Access.
Add the Akeyless Helm Repo
In order to Add the following repository to your Helm repository list, run the following commands:
- Add the Akeyless Helm repository to your local Helm client:
helm repo add akeyless https://akeylesslabs.github.io/helm-charts - Update your local Helm repo cache so it picks up the latest chart version:
helm repo update
Configure the Helm Chart
Below is an explanation of the minimum required fields by section. Find them in the file and edit them as per the instructions:
-
Fetch the Default Values File:
helm show values akeyless/akeyless-gateway > values.yaml -
Configure the Global Section:
############ ## Global ## ############ akeylessGatewayAuth: gatewayAccessId: <your_access_id> gatewayAccessType: access_key gatewayCredentialsExistingSecret: akeyless-authWhere:
gatewayAccessId: Add your API Key'sAccess ID.gatewayAccessType: keep asaccess_keyfor API Key authentication.gatewayCredentialsExistingSecret: References a Kubernetes Secret that stores your API Key's Access Key. create it first by following API Key Authentication in the Akeyless Gateway chart.
-
Review the Gateway Section:
The Gateway section controls the core Gateway deployment and needs no changes for a standard setup. By default it creates two Gateway replicas for high availability, You can customize that by changing the
replicaCountvariable. -
Configure the Secure Remote Access Section:
###################################################### ## Default values for akeyless-secure-remote-access ## ###################################################### sra: # Enable secure-remote-access. Valid values: true/false. enabled: true sshConfig: replicaCount: 1 config: CAPublicKey: | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAPzDVmeABzsGd0lEl9m2fdgmCzOLVmEGcLxNkn... ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD9SkmW9Ay7YwWQk9o3r6a4qQ7pI2Yw1M...Where:
sra: Set theenabledfield totrue. Note that the Remote Access deployment creates two more pods in the cluster, one for Web and one for SSH.CAPublicKey: For this to work properly, you are also required to provide the matching public key of the key you used to create the SSH Certificate Issuer in Akeyless. You can provide one or more CA public keys. More info can be found here. Add eachssh-rsavalue on a new line.
Deployment
In order to deploy the Helm chart with values.yaml configured and verify the Gateway and Remote Access pods come up correctly, run the following commands:
-
Deploy the Helm Chart:
helm install quick-start-gw akeyless/akeyless-gateway -f values.yaml -
Verify the Deployment:
kubectl get pods -wConfirm the Gateway and Remote Access pods reach
Runningstatekubectl get servicesConfirm that the Gateway and Remote Access services are available.
Retrieve the Gateway URL
In order to retrieve the Gateway URL run the following commands:
-
Get the external IP:
kubectl get servicesLook for the
EXTERNAL-IPof the service starting withquick-start-gw. -
Open the Gateway console: Copy the
EXTERNAL-IPand open it in your browser on port8000/console, for example:http://<Gateway-EXTERNAL-IP>:8000/console -
If you see the login page, you've successfully deployed the Gateway.
Remote Access URLs
For Remote Access, you can access the following:
-
The Secure Remote Access Internal Web Portal is located at
http://<Gateway-EXTERNAL-IP>:8000/sra/portal -
Secure Remote Access can also be accessed using our public URL:
https://zerotrust.akeyless.io. If you are using the public URL for RDP, Web, or similar sessions, you will be required to add your Web URL endpoint:http://<Gateway-EXTERNAL-IP>:8000/sra/web-client
Note:This guide deployment is not secured with TLS.
If you are usinghttps://console.akeyless.io, you will not be able to interact with this Gateway as it is not secured with TLS.
We strongly recommend not using this setup in production or with real credentials.To configure Gateway with TLS check our TLS Settings doc.
Updated about 3 hours ago
