cluster-api-provider-packet

command module
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 8, 2022 License: Apache-2.0 Imports: 21 Imported by: 0

README

Equinix Metal cluster-api Provider

GitHub release Continuous Integration GoDoc Go Report Card Docker Pulls

This is the official cluster-api provider for Equinix Metal, formerly known as Packet. It implements cluster-api provider version v1beta1.

Packetbot works hard to keep Kubernetes cluster in a good shape

Requirements

To use the cluster-api to deploy a Kubernetes cluster to Equinix Metal, you need the following:

  • A Equinix Metal API key
  • A Equinix Metal project ID
  • The clusterctl binary from the official cluster-api provider releases page
  • A Kubernetes cluster - the "bootstrap cluster" - that will deploy and manage the cluster on Equinix Metal.
  • kubectl - not absolutely required, but it is hard to interact with a cluster without it!

For the bootstrap cluster, any compliant cluster will work, including official kubernetes, k3s, kind and k3d.

Once you have your cluster, ensure your KUBECONFIG environment variable is set correctly.

Getting Started

You should then follow the Cluster API Quick Start Guide, selecting the 'Equinix Metal' tabs where offered.

Defaults

If you do not change the generated yaml files, it will use defaults. You can look in the templates/cluster-template.yaml file for details.

  • CLUSTER_NAME (defaults to my-cluster)
  • CONTROL_PLANE_MACHINE_COUNT (defaults to 1)
  • KUBE_VIP_VERSION (defaults to v0.5.0)
  • NODE_OS (defaults to ubuntu_18_04)
  • POD_CIDR (defaults to 192.168.0.0/16)
  • SERVICE_CIDR (defaults to 172.26.0.0/16)
  • WORKER_MACHINE_COUNT (defaults to 0)
Reserved Hardware

If you'd like to use reserved instances for your cluster, you need to edit your cluster yaml and add a hardwareReservationID field to your PacketMachineTemplates. That field can contain either a comma-separated list of hardware reservation IDs you'd like to use (which will cause it to ignore the facility and machineType you've specified), or just "next-available" to let the controller pick one that's available (that matches the machineType and facility you've specified). Here's an example:

apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: PacketMachineTemplate
metadata:
  name: my-cluster-control-plane
  namespace: default
spec:
  template:
    spec:
      billingCycle: hourly
      machineType: c3.small.x86
      os: ubuntu_18_04
      sshKeys:
      - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDvMgVEubPLztrvVKgNPnRe9sZSjAqaYj9nmCkgr4PdK username@computer
      tags: []
      #If you want to specify the exact machines to use, provide a comma separated list of UUIDs
      hardwareReservationID: "b537c5aa-2ef3-11ed-a261-0242ac120002,b537c5aa-2ef3-11ed-a261-0242ac120002"
      #Or let the controller pick from available reserved hardware in the project that matches machineType and facility with `next-available`
      #hardwareReservationID: "next-available"

Community, discussion, contribution, and support

Learn how to engage with the Kubernetes community on the community page.

Equinix has a cluster-api guide

You can reach the maintainers of this project at:

Development and Customizations

The following section describes how to use the cluster-api provider for packet (CAPP) as a regular user. You do not need to clone this repository, or install any special tools, other than the standard kubectl and clusterctl; see below.

Code of conduct

Participation in the Kubernetes community is governed by the Kubernetes Code of Conduct.

Documentation

Overview

Copyright 2020 The Kubernetes Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Directories

Path Synopsis
api
v1alpha3
Package v1alpha3 contains API Schema definitions for the infrastructure v1alpha3 API group +kubebuilder:object:generate=true +groupName=infrastructure.cluster.x-k8s.io
Package v1alpha3 contains API Schema definitions for the infrastructure v1alpha3 API group +kubebuilder:object:generate=true +groupName=infrastructure.cluster.x-k8s.io
v1beta1
Package v1beta1 contains API Schema definitions for the infrastructure v1beta1 API group +kubebuilder:object:generate=true +groupName=infrastructure.cluster.x-k8s.io
Package v1beta1 contains API Schema definitions for the infrastructure v1beta1 API group +kubebuilder:object:generate=true +groupName=infrastructure.cluster.x-k8s.io
cmd
hack
boilerplate/test
Package test contains test boilerplate.
Package test contains test boilerplate.
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL