Quickstart
Warning
This site is still under development.
Create a new Cluster
Navigate to the dashboard of your Capi Console. In the left side menu click on Clusters to view the list of clusters.
Now, click on Create to create your first cluster.
Assign a name to your cluster and click on Create.
Wait for the cluster to be ready
Wait for the cluster to be ready. This may take a few minutes.
Connect to the cluster
When the cluster is ready, click on Kubeconfig to download the kubeconfig file.
On your local machine, set the KUBECONFIG
environment variable to the path of the downloaded file.
export KUBECONFIG=/path/to/kubeconfig
Deploy an application
Now, let’s deploy an application to the cluster. We will deploy the nginx web server.
kubectl create deployment nginx --image=nginx
Expose the application
Expose the application using an Ingress.
First, create a ClusterIP service to expose the application within the cluster.
kubectl expose deployment nginx --port=80
Then create an Ingress to expose the application outside the cluster.
kubectl apply -f - <<EOF
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: nginx
spec:
rules:
- host: nginx.example.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: nginx
port:
number: 80
Access the application
To access the application, you need to add an entry to your /etc/hosts
file or to your DNS server.
Get the IP address of the cluster.
cat $KUBECONFIG | grep server
# server: https://<dns-name>
Resolve the DNS name to an IP address.
dig +short <dns-name>
# <ip-address>
Add an entry to your /etc/hosts
file, replacing <ip-address>
with the IP address of the cluster.
Or add an entry to your DNS server.
echo "<ip-address> nginx.example.com" | sudo tee -a /etc/hosts
Cleanup
You can delete the cluster directly from the web interface by clicking on Delete.