Skip to content

Add more GCVE documentation #8146

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

fabriziopandini
Copy link
Member

Kudos to @chrischdi for the great work!

This adds a little bit of doc on top
/cc @sbueringer

@k8s-ci-robot k8s-ci-robot requested a review from sbueringer May 28, 2025 10:27
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. area/infra Infrastructure management, infrastructure design, code in infra/ area/infra/gcp Issues or PRs related to Kubernetes GCP infrastructure area/terraform Terraform modules, testing them, writing more of them, code in infra/gcp/clusters/ labels May 28, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fabriziopandini

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added sig/k8s-infra Categorizes an issue or PR as relevant to SIG K8s Infra. approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels May 28, 2025
Copy link
Member

@chrischdi chrischdi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some wording / nits.

Thanks for this useful information!

@@ -0,0 +1,25 @@
# Boskos

Boskos support resources of type `gcve-vsphere-project` to allow each test run to use a subset of vSphere resources.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Boskos support resources of type `gcve-vsphere-project` to allow each test run to use a subset of vSphere resources.
Boskos resources of type `gcve-vsphere-project` allow each test run to use a subset of vSphere resources.


See [README.md](https://github.com/kubernetes/k8s.io/tree/main/infra/gcp/terraform) for a general intro about using terraform in k8s.io.

In order to apply terraform manifests you must be enabled to use the "broadcom-451918" project, please reach to [owners](../OWNERS) in case of need.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In order to apply terraform manifests you must be enabled to use the "broadcom-451918" project, please reach to [owners](../OWNERS) in case of need.
In order to apply terraform manifests you must be enabled to use the "broadcom-451918" project, please reach out to [owners](../OWNERS) in case of need.

docker run -it --rm -v $(pwd):/workspace --entrypoint=/bin/bash gcr.io/k8s-staging-infra-tools/k8s-infra:v20241217-f8b07a049
```

From your local workstatin / from inside the terraform container:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
From your local workstatin / from inside the terraform container:
From your local workstation / from inside the terraform container:

gcloud vmware private-clouds describe k8s-gcp-gcve-pc --location us-central1-a --format='json' | jq -r '.vcenter.internalIp + " " + .vcenter.fqdn +"\n" + .nsx.internalIp + " " + .nsx.fqdn'
```

Add those entry to `/etc/hosts`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Add those entry to `/etc/hosts`.
Add those entries to `/etc/hosts`.


Wiregard is used to get a secure and convenient access through the maintenace jump host VM.

In order to use wiregard you must be enabled to use the "broadcom-451918" project, please reach to [owners](../OWNERS) in case of need.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In order to use wiregard you must be enabled to use the "broadcom-451918" project, please reach to [owners](../OWNERS) in case of need.
In order to use wiregard you must be enabled to use the "broadcom-451918" project, please reach out to [owners](../OWNERS) in case of need.

Note: [email protected] user is creating automatically in a VMware Engine instance;
we are using it to set up vSphere and create a dedicate user for prow CI (with limited permissions).

Also, the terraform manifests in this folder requires `/etc/hosts` entries for vSphere and NSX
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Also, the terraform manifests in this folder requires `/etc/hosts` entries for vSphere and NSX
Also, the terraform manifests in this folder require `/etc/hosts` entries for vSphere and NSX


# Accessing vSphere and NSX UI.

If required for maintenance reasons, it is possible to access the vSphere UI via [wirequard](../docs/wiregard.md) / [jumphost VM](../maintenance-jumphost/README.md).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If required for maintenance reasons, it is possible to access the vSphere UI via [wirequard](../docs/wiregard.md) / [jumphost VM](../maintenance-jumphost/README.md).
If required for maintenance reasons, it is possible to access the vSphere UI via [wireguard](../docs/wiregard.md) / [jumphost VM](../maintenance-jumphost/README.md).


First we generate a password for the user which will be used in prow and set it as environment variable:
The `k8s-infra-gcp-gcve` project sets up the infrastructure that actually runs the VMs created from the prow container. There are ther main components of this infrastracture:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The `k8s-infra-gcp-gcve` project sets up the infrastructure that actually runs the VMs created from the prow container. There are ther main components of this infrastracture:
The `k8s-infra-gcp-gcve` project sets up the infrastructure that actually runs the VMs created from the prow container. These are the main components of this infrastructure:

export GOVC_USERNAME='[email protected]'
export GOVC_PASSWORD="$(gcloud vmware private-clouds vcenter credentials describe --private-cloud=k8s-gcp-gcve-pc [email protected] --location=us-central1-a --format='get(password)')"
```
The terraform manifest in the `/maintenance-jumphost` uses the GCP terraform provider to setup a jumphost VM to be used to set up vSphere or for maintenance pourposes. See
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The terraform manifest in the `/maintenance-jumphost` uses the GCP terraform provider to setup a jumphost VM to be used to set up vSphere or for maintenance pourposes. See
The terraform manifest in the `/maintenance-jumphost` uses the GCP terraform provider to setup a jumphost VM to be used to set up vSphere or for maintenance purposes. See


Run the script to setup the user, groups and IAM in vSphere.
The terraform manifest in the `/vsphere` folder uses the vSphere and the NSX terraform providers to setup e.g. content libraries, templetes, folders,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The terraform manifest in the `/vsphere` folder uses the vSphere and the NSX terraform providers to setup e.g. content libraries, templetes, folders,
The terraform manifest in the `/vsphere` folder uses the vSphere and the NSX terraform providers to setup e.g. content libraries, templates, folders,

```sh
export GCVE_PROW_CI_PASSWORD="SomePassword"
```
The terraform manifest in this folder, which is applied by test-infra automation (Atlantis), uses the GCP terraform provider for creating.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just learned that this does not work for us: #8148 (comment)

Should we add terraform instructions instead?

When ready:

```sh
terraform init
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add tfswitch?

Suggested change
terraform init
tfswitch
terraform init

The tfswitch command is available in the docker container and ensures the right terraform version (set at the provider.tf file) is used.

@chrischdi
Copy link
Member

/lgtm

Addressed the comments in #8148

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 5, 2025
@k8s-ci-robot k8s-ci-robot merged commit 23b8a6f into kubernetes:main Jun 5, 2025
3 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.34 milestone Jun 5, 2025
@fabriziopandini
Copy link
Member Author

@chrischdi thanks for addressing comments in another PR, I'm running low of bandwidth lately

@fabriziopandini fabriziopandini deleted the document-k8s-infra-gcp-gcve branch June 6, 2025 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/infra/gcp Issues or PRs related to Kubernetes GCP infrastructure area/infra Infrastructure management, infrastructure design, code in infra/ area/terraform Terraform modules, testing them, writing more of them, code in infra/gcp/clusters/ cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/k8s-infra Categorizes an issue or PR as relevant to SIG K8s Infra. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants