Primary Objects#

SkyProvider Object#

SkyProvider is an object that represents a cloud provider. By creating a SkyProvider object, the minimum setup and configuration required to deploy virtual services on the cloud provider is done.

 1apiVersion: xrds.skycluster.io/v1alpha1
 2kind: SkyProvider
 3metadata:
 4  name: sky-provider-test1
 5  namespace: skytest
 6  labels:
 7    skycluster.io/managed-by: skycluster
 8
 9    # This is part of internal settings and users do not
10    # need to set this.
11    # skycluster.io/provider-name: os
12    # skycluster.io/provider-region: SCINET
13    # skycluster.io/provider-zone: default
14
15    # Often there is a need to use existing external resources
16    # such as a public network, an existing router, etc.
17    # You can specify the external resource ID using
18    # the following labels:
19    # skycluster.io/ext-Kind-Group-Version: <resource-name>
20    # Due to the annotation key length limit, we only use
21    # the first word of the api group.
22    # This approach prevents creating, modifying or deleting
23    # the resource group by SkyCluster. However, SkyCluster
24    # pull resource group information and use them when
25    # creating other resources.
26
27    # For Azure, for instance, you can specify the resource group:
28    # skycluster.io/ext-ResourceGroup-azure-v1beta1: skycluster-manual
29
30    # For OpenStack providers, SkyCluster does not support creating
31    # a public (external) network.
32    # The network should exist before creating the provider.
33    # Use the label below to specify the external network name:
34    # skycluster.io/ext-os-public-subnet-name: ext-net
35
36    # Other examples:
37    # skycluster.io/ext-ProjectV3-identity-v1alpha1: 1e1c7...3ddc8f30b
38    # skycluster.io/ext-RouterV2-networking-v1alpha1: 0033d21...6153167017
39spec:
40  forProvider:
41    # For openstack, we get the subnet cidr, typically in the form of
42    # x.y.z.0/24, and we manually assign the network cidr to x.y.0.0/16
43    # Currently, this is the only swttings we support
44    vpcCidr: 10.80.10.0/24
45    gateway: {}
46      # flavor: small
47      # If public key is not provided, a new keypair using SkyCluster keypair secret
48      # will be created. This secert should be generated during the configuration of
49      # the SkyCluster.
50      # publicKey: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDQz3
51    # You can omit the vpnServer section if the secret containing the overley data
52    # is already created, otherwise you need to provide all fields within the vpnServer section
53    # vpnServer:
54    #   host: http://vpnserver.com
55    #   port: 443
56    #   token: 123df456
57    #   ca_cert: base64 encoded string of the ca.crt content
58  providerRef:
59    # Provider name can be any of the supported providers
60    # Currently, we support aws, gcp, azure and os (openstack)
61    providerName: os
62    providerRegion: <RegionName>
63    providerZone: <ZoneName>

skyprovider-example.sh

 1apiVersion: xrds.skycluster.io/v1alpha1
 2kind: SkyProvider
 3metadata:
 4  name: skyprovider-test102
 5  namespace: skytest
 6  labels:
 7    skycluster.io/managed-by: skycluster
 8    # the following labels should be added internally
 9    skycluster.io/provider-name: aws
10    skycluster.io/provider-region: us-east-1
11    skycluster.io/provider-zone: use1-az1
12spec:
13  forProvider:
14    vpcCidr: 10.30.185.0/24
15  providerRef:
16    providerName: aws
17    providerRegion: us-east-1
18    providerZone: use1-az1

SkyVM Object#

SkyVM is a virtual machine that can be deployed across any of the registered providers by specifying the providerRef object.

 1apiVersion: xrds.skycluster.io/v1alpha1
 2kind: SkyVM
 3metadata:
 4  name: skyvm-test-1018
 5  namespace: skytest
 6  labels:
 7    skycluster.io/managed-by: skycluster
 8    # the following labels should be added internally
 9    skycluster.io/provider-name: <ProviderName>
10    skycluster.io/provider-region: <RegionName>
11    skycluster.io/provider-zone: <ZoneName>
12spec:
13  forProvider: {}
14    # Or you can specify the VM size and image:
15    # flavor: small/medium/large/xlarge
16    # image: ubuntu-22.04/ubuntu-20.04/ubuntu-18.04
17
18    # userData: |
19    #   #cloud-config
20    #   runcmd:
21    #     - echo "Hello, World!" > /tmp/hello.txt
22
23    # publicIp: true
24    # You can create a new keypair exclusively for this VM
25    # by providing the public key. If it is not provided,
26    # the default skycluster keypair is used.
27    # publicKey: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD
28
29    # You can create a custom security group for this VM:
30    # secGroup:
31    #   description: "Allow SSH and HTTP"
32    #   tcpPorts:
33    #     - fromPort: 22
34    #       toPort: 22
35    #     - fromPort: 80
36    #       toPort: 80
37    #   udpPorts: []
38
39  providerRef:
40    # Provider name can be any of the supported providers
41    # Currently, we support aws, gcp, azure and os (openstack)
42    providerName: <ProviderName>
43    providerRegion: <RegionName>
44    providerZone: <ZoneName>

skyvm-example.sh

 1apiVersion: xrds.skycluster.io/v1alpha1
 2kind: SkyVM
 3metadata:
 4  name: skyvm-test102
 5  namespace: skytest
 6  labels:
 7    skycluster.io/managed-by: skycluster
 8    # the following labels should be added internally
 9    skycluster.io/provider-name: aws
10    skycluster.io/provider-region: us-east-1
11    skycluster.io/provider-zone: use1-az1
12spec:
13  forProvider: {}
14  providerRef:
15    providerName: aws
16    providerRegion: us-east-1
17    providerZone: use1-az1

SkyK8S Object#

SkyK8S is a virtual Kubernetes cluster which can be deployed geographically distributed across multiple cloud providers. We optimize the deployment of node pools across multiple cloud providers. So you need to specify the data flow and location constraints for each node pool. The node instances within each node pool is determined by minimum and max number of nodes and location and quality constraints.

skyk8s-example.sh

 1apiVersion: skycluster.io/v1alpha1
 2kind: SkyK8S
 3metadata:
 4  labels:
 5    skycluster.io/managed-by: skycluster
 6  name: my-skyk8s-1
 7spec:
 8
 9  # If multicluster is set to true, each node pool forms
10  # a separate cluster. A multi-cluster k8s is formed by joining
11  # multiple clusters.
12  # If multicluster is set to false, a single cluster spans
13  # across all nodes. Currently, only single cluster is supported.
14  enableMultiCluster: false
15
16  # An array of configuration for each node pool can be specified
17  # All nodes in this pool share the same configuration
18  nodePools:
19
20    # You can distinguish the controller node by setting controller
21    # field to true. If no node pool is specified with controller
22    # set to true, a controller node is created from the first node pool
23    - controller: true
24      machineType: n1-standard-2
25      diskSizeGb: 100
26      diskType: pd-ssd
27
28      # The controller cannot be preemptible and
29      # this option only applies to agent nodes.
30      # If an agent node is terminated, the skycluster tries to
31      # recreate the node given the constraints and configurations.
32      # This option is not implemented yet.
33      preemptible: false
34
35      # Auto scalling functionally enables scalling of the nodes in
36      # this node pool. Not implemented yet.
37      autoscaling:
38        # The minimum and maximum number of nodes is used to ensure
39        # The number of nodes in the pool is within the specified range
40        minCount: 3
41        maxCount: 5
42        metrics:
43          - type: Resource
44            resource:
45              name: cpu
46              targetAverageUtilization: 50
47          - type: Resource
48            resource:
49              name: memory
50              targetAverageUtilization: 50
51          # Custom metrics should be specified as part of services within
52          # the cluster using the post-setup application configuration
53          - type: Metric
54            metric:
55              endpoint: /k8s-metrics
56              target: 50
57
58      # For each node pool, you can specify the location constrains
59      locationConstraints:
60        permitted:
61          - name: us-central1-a-edge
62            region: us-central1
63            regionAlias: us-central1
64            regionType: Edge
65            # When all fields are set, the intersection of the fields is used
66          - region: us-east
67            regionType: Edge
68          # When nmultiple permitted fields are set,
69          # the union of the fields is used
70        required:
71          - name: us-central1-a-edge-12345
72            # Same as permitted, when multiple fields are set,
73            # the intersection of them is used
74          - regionAlias: us-east1
75            regionType: Edge
76          # Same as permitted, when multiple required fields are set,
77          # the union of the fields is used

SkyOverlay Object#

SkyOverlay is an overlay vpn solution that enables point to point communication and routing between virtual services across multiple providers.

skyoverlay-example.sh

 1apiVersion: skycluster.io/v1alpha1
 2kind: SkyOverlay
 3metadata:
 4  labels:
 5    skycluster.io/managed-by: skycluster
 6  name: my-skyoverlay-1
 7spec:
 8  rendezvousAddress: 100.24.214.22:9586
 9  rendezvousToken: 1234567890
10  providersRef:
11    - name: us-central1-a-edge-12345
12    - name: us-east1-a-edge-34212
13    - name: eu-central1-cloud-95843

SkyOverlayGateway Object#

skyoverlaygw-example.yaml

 1apiVersion: skycluster.io/v1alpha1
 2kind: SkyOverlayGateway
 3metadata:
 4  name: my-skyoverlaygw-1
 5  labels:
 6    skycluster.io/managed-by: skycluster
 7    skycluster.io/type: ssh-key
 8spec:
 9  rendezvousAddress: 100.24.214.22:9586
10  rendezvousToken: 1234567890
11  providersRef:
12    - name: us-central1-a-edge-12345
13    - name: us-east1-a-edge-34212
14    - name: eu-central1-cloud-95843

SkyOverlayClient Object#

skyoverlayclient-example.yaml

 1apiVersion: skycluster.io/v1alpha1
 2kind: SkyOverlayClient
 3metadata:
 4  labels:
 5    skycluster.io/managed-by: skycluster
 6  name: my-skyoverlayclient-1
 7spec:
 8  rendezvousAddress: 100.24.214.22:9586
 9  rendezvousToken: 1234567890
10  providersRef:
11    - name: us-central1-a-edge-12345
12    - name: us-east1-a-edge-34212
13    - name: eu-central1-cloud-95843