If you want to test Kubeforge
without installing it directly on the Kubernetes cluster, you can follow the steps below to run it as a standalone Docker instance.
-
$\color{#FAFAD2}{\textsf{Preparation}}$ -
Prepare the
Kubeforge
source configuration as a foundation for the next steps.cat <<EOF > "${PWD}/sourceConfiguration.yml" Pod: - metadata: name: bannana-pod spec: containers: - name: bannana command: [ "tail", "-f", "/dev/null" ] EOF
-
Install
Kubeforge
custom resource definition.--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: name: overlays.kubeforge.sh spec: group: kubeforge.sh versions: - name: v1 served: true storage: true schema: # schema used for validation openAPIV3Schema: type: object properties: spec: type: object # Allows any arbitrary structure under `spec` by omitting "properties" # and adding the "x-kubernetes-preserve-unknown-fields" flag x-kubernetes-preserve-unknown-fields: true status: type: object properties: data: type: object x-kubernetes-preserve-unknown-fields: true subresources: status: {} names: kind: Overlay plural: overlays scope: Namespaced ...
-
-
$\color{#EEE8AA}{\textsf{Installation}}$ -
Execute the
Kubeforge
docker container with mounted kubeconfig and source configuration.docker run \ --volume "${HOME}/.kube/config:/opt/.kube/config" \ --volume "${PWD}/sourceConfiguration.yml:/opt/sourceConfiguration.yml" --environment KUBEFORGE_KUBERNETES_CONFIG=/opt/.kube/config \ --environment KUBEFORGE_SOURCE_CONFIGURATION=/opt/sourceConfiguration.yml \ ghcr.io/wsadza/kubeforge
-
-
$\color{#F0E68C}{\textsf{Usage}}$ -
Create a
Kubeforge
overlay resource to provision the "banana-pod"cat <<EOF | kubectl apply -f - apiVersion: kubeforge.sh/v1 kind: Overlay metadata: name: "bannana" spec: data: Pod: - metadata: name: bannana-pod spec: containers: - name: bannana image: busybox EOF
-
The default method of working with Kubeforge
is to install it directly on a Kubernetes cluster - installation is streamlined through Helm chart templates.
-
$\color{#FAFAD2}{\textsf{Preparation}}$ -
Add the Helm chart repository.
helm repo add kubeforge https://wsadza.github.io/kubeforge && helm repo update
-
-
$\color{#EEE8AA}{\textsf{Installation}}$ -
Install the
Kubeforge
Helm chart with a customized source configurationcat <<EOF | helm install kubeforge kubeforge/kubeforge -f - kubeforge: sourceConfiguration: Pod: - metadata: name: bannana-pod spec: containers: - name: bannana command: [ "tail", "-f", "/dev/null" ] EOF
-
-
$\color{#F0E68C}{\textsf{Usage}}$ -
Create a
Kubeforge
overlay resource to provision the "banana-pod"cat <<EOF | kubectl apply -f - apiVersion: kubeforge.sh/v1 kind: Overlay metadata: name: "bannana" spec: data: Pod: - metadata: name: bannana-pod spec: containers: - name: bannana image: busybox EOF
-