mirror of
https://github.com/imjasonh/gcloud-help
synced 2026-07-18 23:08:48 +00:00
gcloud: Wed Mar 9 08:39:30 UTC 2022
This commit is contained in:
parent
5829e94e90
commit
7d82d0fc32
210 changed files with 7192 additions and 887 deletions
75
gcloud/beta/container/fleet/memberships/delete
Normal file
75
gcloud/beta/container/fleet/memberships/delete
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
NAME
|
||||
gcloud beta container fleet memberships delete - delete a membership
|
||||
|
||||
SYNOPSIS
|
||||
gcloud beta container fleet memberships delete
|
||||
(MEMBERSHIP : --location=LOCATION) [--async] [GCLOUD_WIDE_FLAG ...]
|
||||
|
||||
DESCRIPTION
|
||||
(BETA) This command deletes the Fleet membership resource corresponding to
|
||||
the cluster.
|
||||
|
||||
This command is intended to delete stale Fleet Membership resources as
|
||||
doing so on a fully registered cluster will skip uninstalling the Connect
|
||||
Agent and and orphan in-cluster resources and agent connections to Google.
|
||||
To completely unregister the cluster, consider using the command: gcloud
|
||||
beta container fleet memberships unregister.
|
||||
|
||||
EXAMPLES
|
||||
Delete a membership from Fleet:
|
||||
|
||||
$ gcloud beta container fleet memberships delete a-membership
|
||||
|
||||
POSITIONAL ARGUMENTS
|
||||
Membership resource - The cluster membership to delete. The arguments in
|
||||
this group can be used to specify the attributes of this resource. (NOTE)
|
||||
Some attributes are not given arguments in this group but can be set in
|
||||
other ways. To set the project attribute:
|
||||
◆ provide the argument membership on the command line with a fully
|
||||
specified name;
|
||||
◆ set the property core/project;
|
||||
◆ provide the argument --project on the command line.
|
||||
|
||||
This must be specified.
|
||||
|
||||
MEMBERSHIP
|
||||
ID of the membership or fully qualified identifier for the
|
||||
membership. To set the membership attribute:
|
||||
▸ provide the argument membership on the command line.
|
||||
|
||||
This positional must be specified if any of the other arguments in
|
||||
this group are specified.
|
||||
|
||||
--location=LOCATION
|
||||
The location name. To set the location attribute:
|
||||
▸ provide the argument membership on the command line with a fully
|
||||
specified name;
|
||||
▸ provide the argument --location on the command line;
|
||||
▸ global is the only supported location.
|
||||
|
||||
FLAGS
|
||||
--async
|
||||
Return immediately, without waiting for the operation in progress to
|
||||
complete.
|
||||
|
||||
GCLOUD WIDE FLAGS
|
||||
These flags are available to all commands: --access-token-file, --account,
|
||||
--billing-project, --configuration, --flags-file, --flatten, --format,
|
||||
--help, --impersonate-service-account, --log-http, --project, --quiet,
|
||||
--trace-token, --user-output-enabled, --verbosity.
|
||||
|
||||
Run $ gcloud help for details.
|
||||
|
||||
API REFERENCE
|
||||
This command uses the gkehub/v1beta1 API. The full documentation for this
|
||||
API can be found at:
|
||||
https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster
|
||||
|
||||
NOTES
|
||||
This command is currently in beta and might change without notice. These
|
||||
variants are also available:
|
||||
|
||||
$ gcloud container fleet memberships delete
|
||||
|
||||
$ gcloud alpha container fleet memberships delete
|
||||
|
||||
63
gcloud/beta/container/fleet/memberships/describe
Normal file
63
gcloud/beta/container/fleet/memberships/describe
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
NAME
|
||||
gcloud beta container fleet memberships describe - describe a membership
|
||||
|
||||
SYNOPSIS
|
||||
gcloud beta container fleet memberships describe
|
||||
(MEMBERSHIP : --location=LOCATION) [GCLOUD_WIDE_FLAG ...]
|
||||
|
||||
DESCRIPTION
|
||||
(BETA) Describe a membership in Fleet.
|
||||
|
||||
EXAMPLES
|
||||
Describe a membership in Fleet:
|
||||
|
||||
$ gcloud beta container fleet memberships describe a-membership
|
||||
|
||||
POSITIONAL ARGUMENTS
|
||||
Membership resource - The cluster membership to describe. The arguments in
|
||||
this group can be used to specify the attributes of this resource. (NOTE)
|
||||
Some attributes are not given arguments in this group but can be set in
|
||||
other ways. To set the project attribute:
|
||||
◆ provide the argument membership on the command line with a fully
|
||||
specified name;
|
||||
◆ set the property core/project;
|
||||
◆ provide the argument --project on the command line.
|
||||
|
||||
This must be specified.
|
||||
|
||||
MEMBERSHIP
|
||||
ID of the membership or fully qualified identifier for the
|
||||
membership. To set the membership attribute:
|
||||
▸ provide the argument membership on the command line.
|
||||
|
||||
This positional must be specified if any of the other arguments in
|
||||
this group are specified.
|
||||
|
||||
--location=LOCATION
|
||||
The location name. To set the location attribute:
|
||||
▸ provide the argument membership on the command line with a fully
|
||||
specified name;
|
||||
▸ provide the argument --location on the command line;
|
||||
▸ global is the only supported location.
|
||||
|
||||
GCLOUD WIDE FLAGS
|
||||
These flags are available to all commands: --access-token-file, --account,
|
||||
--billing-project, --configuration, --flags-file, --flatten, --format,
|
||||
--help, --impersonate-service-account, --log-http, --project, --quiet,
|
||||
--trace-token, --user-output-enabled, --verbosity.
|
||||
|
||||
Run $ gcloud help for details.
|
||||
|
||||
API REFERENCE
|
||||
This command uses the gkehub/v1beta1 API. The full documentation for this
|
||||
API can be found at:
|
||||
https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster
|
||||
|
||||
NOTES
|
||||
This command is currently in beta and might change without notice. These
|
||||
variants are also available:
|
||||
|
||||
$ gcloud container fleet memberships describe
|
||||
|
||||
$ gcloud alpha container fleet memberships describe
|
||||
|
||||
47
gcloud/beta/container/fleet/memberships/get-credentials
Normal file
47
gcloud/beta/container/fleet/memberships/get-credentials
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
NAME
|
||||
gcloud beta container fleet memberships get-credentials - fetch credentials
|
||||
for a Fleet-registered cluster to be used in Connect Gateway
|
||||
|
||||
SYNOPSIS
|
||||
gcloud beta container fleet memberships get-credentials MEMBERSHIP
|
||||
[GCLOUD_WIDE_FLAG ...]
|
||||
|
||||
DESCRIPTION
|
||||
(BETA) gcloud beta container fleet memberships get-credentials updates the
|
||||
kubeconfig file with the appropriate credentials and endpoint information
|
||||
to send kubectl commands to a Fleet-registered and connected cluster
|
||||
through Connect Gateway Service.
|
||||
|
||||
It takes a project, passed through by set defaults or flags. By default,
|
||||
credentials are written to $HOME/.kube/config. You can provide an alternate
|
||||
path by setting the KUBECONFIG environment variable. If KUBECONFIG contains
|
||||
multiple paths, the first one is used.
|
||||
|
||||
Upon success, this command will switch current context to the target
|
||||
cluster, when working with multiple clusters.
|
||||
|
||||
EXAMPLES
|
||||
Get gateway kubeconfig for a registered cluster:
|
||||
|
||||
$ gcloud beta container fleet memberships get-credentials my-cluster
|
||||
|
||||
POSITIONAL ARGUMENTS
|
||||
MEMBERSHIP
|
||||
The membership name used to locate a cluster in your project.
|
||||
|
||||
GCLOUD WIDE FLAGS
|
||||
These flags are available to all commands: --access-token-file, --account,
|
||||
--billing-project, --configuration, --flags-file, --flatten, --format,
|
||||
--help, --impersonate-service-account, --log-http, --project, --quiet,
|
||||
--trace-token, --user-output-enabled, --verbosity.
|
||||
|
||||
Run $ gcloud help for details.
|
||||
|
||||
NOTES
|
||||
This command is currently in beta and might change without notice. These
|
||||
variants are also available:
|
||||
|
||||
$ gcloud container fleet memberships get-credentials
|
||||
|
||||
$ gcloud alpha container fleet memberships get-credentials
|
||||
|
||||
49
gcloud/beta/container/fleet/memberships/help
Normal file
49
gcloud/beta/container/fleet/memberships/help
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
NAME
|
||||
gcloud beta container fleet memberships - manage memberships of all your
|
||||
GKE and other Kubernetes cluster with Fleet
|
||||
|
||||
SYNOPSIS
|
||||
gcloud beta container fleet memberships COMMAND [GCLOUD_WIDE_FLAG ...]
|
||||
|
||||
DESCRIPTION
|
||||
(BETA) Manage memberships of all your GKE and other Kubernetes cluster with
|
||||
Fleet.
|
||||
|
||||
GCLOUD WIDE FLAGS
|
||||
These flags are available to all commands: --help.
|
||||
|
||||
Run $ gcloud help for details.
|
||||
|
||||
COMMANDS
|
||||
COMMAND is one of the following:
|
||||
|
||||
delete
|
||||
(BETA) Delete a membership.
|
||||
|
||||
describe
|
||||
(BETA) Describe a membership.
|
||||
|
||||
get-credentials
|
||||
(BETA) Fetch credentials for a Fleet-registered cluster to be used in
|
||||
Connect Gateway.
|
||||
|
||||
list
|
||||
(BETA) List memberships.
|
||||
|
||||
register
|
||||
(BETA) Register a cluster with Fleet.
|
||||
|
||||
unregister
|
||||
(BETA) Unregister a cluster from Fleet.
|
||||
|
||||
update
|
||||
(BETA) Update a membership.
|
||||
|
||||
NOTES
|
||||
This command is currently in beta and might change without notice. These
|
||||
variants are also available:
|
||||
|
||||
$ gcloud container fleet memberships
|
||||
|
||||
$ gcloud alpha container fleet memberships
|
||||
|
||||
69
gcloud/beta/container/fleet/memberships/list
Normal file
69
gcloud/beta/container/fleet/memberships/list
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
NAME
|
||||
gcloud beta container fleet memberships list - list memberships
|
||||
|
||||
SYNOPSIS
|
||||
gcloud beta container fleet memberships list [--filter=EXPRESSION]
|
||||
[--limit=LIMIT] [--page-size=PAGE_SIZE] [--sort-by=[FIELD,...]] [--uri]
|
||||
[GCLOUD_WIDE_FLAG ...]
|
||||
|
||||
DESCRIPTION
|
||||
(BETA) List memberships in Fleet.
|
||||
|
||||
EXAMPLES
|
||||
List memberships in Fleet:
|
||||
|
||||
$ gcloud beta container fleet memberships list
|
||||
|
||||
LIST COMMAND FLAGS
|
||||
--filter=EXPRESSION
|
||||
Apply a Boolean filter EXPRESSION to each resource item to be listed.
|
||||
If the expression evaluates True, then that item is listed. For more
|
||||
details and examples of filter expressions, run $ gcloud topic filters.
|
||||
This flag interacts with other flags that are applied in this order:
|
||||
--flatten, --sort-by, --filter, --limit.
|
||||
|
||||
--limit=LIMIT
|
||||
Maximum number of resources to list. The default is unlimited. This
|
||||
flag interacts with other flags that are applied in this order:
|
||||
--flatten, --sort-by, --filter, --limit.
|
||||
|
||||
--page-size=PAGE_SIZE
|
||||
Some services group resource list output into pages. This flag
|
||||
specifies the maximum number of resources per page. The default is
|
||||
determined by the service if it supports paging, otherwise it is
|
||||
unlimited (no paging). Paging may be applied before or after --filter
|
||||
and --limit depending on the service.
|
||||
|
||||
--sort-by=[FIELD,...]
|
||||
Comma-separated list of resource field key names to sort by. The
|
||||
default order is ascending. Prefix a field with ``~'' for descending
|
||||
order on that field. This flag interacts with other flags that are
|
||||
applied in this order: --flatten, --sort-by, --filter, --limit.
|
||||
|
||||
--uri
|
||||
Print a list of resource URIs instead of the default output, and change
|
||||
the command output to a list of URIs. If this flag is used with
|
||||
--format, the formatting is applied on this URI list. To display URIs
|
||||
alongside other keys instead, use the uri() transform.
|
||||
|
||||
GCLOUD WIDE FLAGS
|
||||
These flags are available to all commands: --access-token-file, --account,
|
||||
--billing-project, --configuration, --flags-file, --flatten, --format,
|
||||
--help, --impersonate-service-account, --log-http, --project, --quiet,
|
||||
--trace-token, --user-output-enabled, --verbosity.
|
||||
|
||||
Run $ gcloud help for details.
|
||||
|
||||
API REFERENCE
|
||||
This command uses the gkehub/v1beta1 API. The full documentation for this
|
||||
API can be found at:
|
||||
https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster
|
||||
|
||||
NOTES
|
||||
This command is currently in beta and might change without notice. These
|
||||
variants are also available:
|
||||
|
||||
$ gcloud container fleet memberships list
|
||||
|
||||
$ gcloud alpha container fleet memberships list
|
||||
|
||||
245
gcloud/beta/container/fleet/memberships/register
Normal file
245
gcloud/beta/container/fleet/memberships/register
Normal file
|
|
@ -0,0 +1,245 @@
|
|||
NAME
|
||||
gcloud beta container fleet memberships register - register a cluster with
|
||||
Fleet
|
||||
|
||||
SYNOPSIS
|
||||
gcloud beta container fleet memberships register CLUSTER_NAME
|
||||
(--gke-cluster=LOCATION/CLUSTER_NAME | --gke-uri=GKE_URI
|
||||
| [--context=CONTEXT : --kubeconfig=KUBECONFIG])
|
||||
(--service-account-key-file=SERVICE_ACCOUNT_KEY_FILE
|
||||
| [--enable-workload-identity : --has-private-issuer
|
||||
| --public-issuer-url=PUBLIC_ISSUER_URL]) [--internal-ip]
|
||||
[--manifest-output-file=MANIFEST_OUTPUT_FILE] [--proxy=PROXY]
|
||||
[GCLOUD_WIDE_FLAG ...]
|
||||
|
||||
DESCRIPTION
|
||||
(BETA) This command registers a cluster with the Fleet by:
|
||||
|
||||
1. Creating a Fleet Membership resource corresponding to the cluster.
|
||||
2. Adding in-cluster Kubernetes Resources that make the cluster exclusive
|
||||
to one Fleet.
|
||||
3. Installing the Connect Agent into this cluster.
|
||||
|
||||
A successful registration implies that the cluster is now exclusive to a
|
||||
single Fleet.
|
||||
|
||||
For more information about Connect Agent, go to:
|
||||
https://cloud.google.com/anthos/multicluster-management/connect/overview/
|
||||
|
||||
To register a non-GKE or GKE On-Prem cluster use --context flag (with an
|
||||
optional --kubeconfig flag).
|
||||
|
||||
To register a GKE cluster use --gke-cluster or --gke-uri flag (no
|
||||
--kubeconfig flag is required).
|
||||
|
||||
In all cases, the Connect Agent that is installed in the target cluster
|
||||
must authenticate to Google using a --service-account-key-file that
|
||||
corresponds to a service account that has been granted gkehub.connect
|
||||
permissions.
|
||||
|
||||
If the cluster is already registered to another Fleet, the registration is
|
||||
not successful.
|
||||
|
||||
Rerunning this command against the same cluster with the same CLUSTER_NAME
|
||||
and target GKEFleet is successful and upgrades the Connect Agent if a new
|
||||
agent is available.
|
||||
|
||||
EXAMPLES
|
||||
Register a non-GKE or GKE On-Prem cluster referenced from a specific
|
||||
kubeconfig file, and install the Connect Agent:
|
||||
|
||||
$ gcloud beta container fleet memberships register my-cluster \
|
||||
--context=my-cluster-context \
|
||||
--kubeconfig=/home/user/custom_kubeconfig \
|
||||
--service-account-key-file=/tmp/keyfile.json
|
||||
|
||||
Register a non-GKE or GKE On-Prem cluster referenced from the default
|
||||
kubeconfig file, and install the Connect Agent:
|
||||
|
||||
$ gcloud beta container fleet memberships register my-cluster \
|
||||
--context=my-cluster-context \
|
||||
--service-account-key-file=/tmp/keyfile.json
|
||||
|
||||
Register a non-GKE or GKE On-Prem cluster, and install a specific version
|
||||
of the Connect Agent:
|
||||
|
||||
$ gcloud beta container fleet memberships register my-cluster \
|
||||
--context=my-cluster-context \
|
||||
--version=gkeconnect_20190802_02_00 \
|
||||
--service-account-key-file=/tmp/keyfile.json
|
||||
|
||||
Register a non-GKE or GKE On-Prem cluster and output a manifest that can be
|
||||
used to install the Connect Agent:
|
||||
|
||||
$ gcloud beta container fleet memberships register my-cluster \
|
||||
--context=my-cluster-context \
|
||||
--manifest-output-file=/tmp/manifest.yaml \
|
||||
--service-account-key-file=/tmp/keyfile.json
|
||||
|
||||
Register a GKE cluster referenced from a GKE URI, and install the Connect
|
||||
Agent:
|
||||
|
||||
$ gcloud beta container fleet memberships register my-cluster \
|
||||
--gke-uri=my-cluster-gke-uri \
|
||||
--service-account-key-file=/tmp/keyfile.json
|
||||
|
||||
Register a GKE cluster referenced from a GKE Cluster location and name, and
|
||||
install the Connect Agent:
|
||||
|
||||
$ gcloud beta container fleet memberships register my-cluster \
|
||||
--gke-cluster=my-cluster-region-or-zone/my-cluster \
|
||||
--service-account-key-file=/tmp/keyfile.json
|
||||
|
||||
Register a GKE cluster, and install a specific version of the Connect
|
||||
Agent:
|
||||
|
||||
$ gcloud beta container fleet memberships register my-cluster \
|
||||
--gke-uri=my-cluster-gke-uri \
|
||||
--version=gkeconnect_20190802_02_00 \
|
||||
--service-account-key-file=/tmp/keyfile.json
|
||||
|
||||
$ gcloud beta container fleet memberships register my-cluster \
|
||||
--gke-cluster=my-cluster-region-or-zone/my-cluster \
|
||||
--version=gkeconnect_20190802_02_00 \
|
||||
--service-account-key-file=/tmp/keyfile.json
|
||||
|
||||
Register a GKE cluster and output a manifest that can be used to install
|
||||
the Connect Agent:
|
||||
|
||||
$ gcloud beta container fleet memberships register my-cluster \
|
||||
--gke-uri=my-cluster-gke-uri \
|
||||
--manifest-output-file=/tmp/manifest.yaml \
|
||||
--service-account-key-file=/tmp/keyfile.json
|
||||
|
||||
$ gcloud beta container fleet memberships register my-cluster \
|
||||
--gke-cluster=my-cluster-region-or-zone/my-cluster \
|
||||
--manifest-output-file=/tmp/manifest.yaml \
|
||||
--service-account-key-file=/tmp/keyfile.json
|
||||
|
||||
POSITIONAL ARGUMENTS
|
||||
CLUSTER_NAME
|
||||
The membership name that you choose to uniquely represents the cluster
|
||||
being registered on the Fleet.
|
||||
|
||||
REQUIRED FLAGS
|
||||
Cluster identifier.
|
||||
|
||||
Exactly one of these must be specified:
|
||||
|
||||
--gke-cluster=LOCATION/CLUSTER_NAME
|
||||
The location/name of the GKE cluster. The location can be a zone or a
|
||||
region for e.g us-central1-a/my-cluster.
|
||||
|
||||
--gke-uri=GKE_URI
|
||||
The URI of a GKE cluster that you want to register to Hub; for
|
||||
example,
|
||||
'https://container.googleapis.com/v1/projects/my-project/locations/us-central1-a/clusters/my-cluster'.
|
||||
To obtain the URI, you can run 'gcloud container clusters list
|
||||
--uri'. Note that this should only be provided if the cluster being
|
||||
registered is a GKE cluster. The service will validate the provided
|
||||
URI to confirm that it maps to a valid GKE cluster."
|
||||
|
||||
Non-GKE cluster identifier.
|
||||
|
||||
--context=CONTEXT
|
||||
The cluster context as it appears in the kubeconfig file. You can
|
||||
get this value from the command line by running command: kubectl
|
||||
config current-context.
|
||||
|
||||
This flag must be specified if any of the other arguments in this
|
||||
group are specified.
|
||||
|
||||
--kubeconfig=KUBECONFIG
|
||||
The kubeconfig file containing an entry for the cluster. Defaults
|
||||
to $KUBECONFIG if it is set in the environment, otherwise defaults
|
||||
to $HOME/.kube/config.
|
||||
|
||||
Exactly one of these must be specified:
|
||||
|
||||
--service-account-key-file=SERVICE_ACCOUNT_KEY_FILE
|
||||
The JSON file of a Google Cloud service account private key. This
|
||||
service account key is stored as a secret named creds-gcp in
|
||||
gke-connect namespace. To update the creds-gcp secret in gke-connect
|
||||
namespace with a new service account key file, run the following
|
||||
command:
|
||||
|
||||
kubectl delete secret creds-gcp -n gke-connect
|
||||
|
||||
kubectl create secret generic creds-gcp -n gke-connect
|
||||
--from-file=creds-gcp.json=/path/to/file
|
||||
|
||||
Workload Identity
|
||||
|
||||
--enable-workload-identity
|
||||
Enable Workload Identity when registering the cluster with Fleet.
|
||||
Ensure that GKE Workload Identity is enabled on your GKE cluster,
|
||||
it is a requirement for using Workload Identity with memberships.
|
||||
Refer to the Registering a cluster using Workload Identity section
|
||||
in
|
||||
https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster#register_cluster
|
||||
--service_account_key_file flag should not be set if this is set.
|
||||
|
||||
This flag must be specified if any of the other arguments in this
|
||||
group are specified.
|
||||
|
||||
At most one of these can be specified:
|
||||
|
||||
--has-private-issuer
|
||||
Set to true for clusters where no publicly-routable OIDC
|
||||
discovery endpoint for the Kubernetes service account token
|
||||
issuer exists.
|
||||
|
||||
When set to true, the gcloud command-line tool will read the
|
||||
private issuer URL and JSON Web Key Set (JWKS) (public keys) for
|
||||
validating service account tokens from the cluster's API server
|
||||
and upload both when creating the Membership. Google Cloud
|
||||
Platform will then use the JWKS, instead of a public OIDC
|
||||
endpoint, to validate service account tokens issued by this
|
||||
cluster. Note the JWKS establishes the uniqueness of issuers in
|
||||
this configuration, but issuer claims in tokens are still
|
||||
compared to the issuer URL associated with the Membership when
|
||||
validating tokens.
|
||||
|
||||
Note the cluster's OIDC discovery endpoints (KUBE-API-ADDRESS
|
||||
(https://)/.well-known/openid-configuration and KUBE-API-ADDRESS
|
||||
(https://)/openid/v1/jwks) must still be network-accessible to
|
||||
the gcloud client running this command.
|
||||
|
||||
--public-issuer-url=PUBLIC_ISSUER_URL
|
||||
Skip auto-discovery and register the cluster with this issuer
|
||||
URL. Use this option when the OpenID Provider Configuration and
|
||||
associated JSON Web Key Set for validating the cluster's service
|
||||
account JWTs are served at a public endpoint different from the
|
||||
cluster API server. Requires --enable-workload-identity.
|
||||
|
||||
OPTIONAL FLAGS
|
||||
--internal-ip
|
||||
Whether to use the internal IP address of the cluster endpoint.
|
||||
|
||||
--manifest-output-file=MANIFEST_OUTPUT_FILE
|
||||
The full path of the file into which the Connect Agent installation
|
||||
manifest should be stored. If this option is provided, then the
|
||||
manifest will be written to this file and will not be deployed into the
|
||||
cluster by gcloud, and it will need to be deployed manually.
|
||||
|
||||
--proxy=PROXY
|
||||
The proxy address in the format of http[s]://{hostname}. The proxy must
|
||||
support the HTTP CONNECT method in order for this connection to
|
||||
succeed.
|
||||
|
||||
GCLOUD WIDE FLAGS
|
||||
These flags are available to all commands: --access-token-file, --account,
|
||||
--billing-project, --configuration, --flags-file, --flatten, --format,
|
||||
--help, --impersonate-service-account, --log-http, --project, --quiet,
|
||||
--trace-token, --user-output-enabled, --verbosity.
|
||||
|
||||
Run $ gcloud help for details.
|
||||
|
||||
NOTES
|
||||
This command is currently in beta and might change without notice. These
|
||||
variants are also available:
|
||||
|
||||
$ gcloud container fleet memberships register
|
||||
|
||||
$ gcloud alpha container fleet memberships register
|
||||
|
||||
114
gcloud/beta/container/fleet/memberships/unregister
Normal file
114
gcloud/beta/container/fleet/memberships/unregister
Normal file
|
|
@ -0,0 +1,114 @@
|
|||
NAME
|
||||
gcloud beta container fleet memberships unregister - unregister a cluster
|
||||
from Fleet
|
||||
|
||||
SYNOPSIS
|
||||
gcloud beta container fleet memberships unregister CLUSTER_NAME
|
||||
(--gke-cluster=LOCATION/CLUSTER_NAME | --gke-uri=GKE_URI
|
||||
| [--context=CONTEXT : --kubeconfig=KUBECONFIG])
|
||||
[GCLOUD_WIDE_FLAG ...]
|
||||
|
||||
DESCRIPTION
|
||||
(BETA) This command unregisters a cluster with the Fleet by:
|
||||
|
||||
1. Deleting the Fleet Membership resource for this cluster (a.k.a
|
||||
`gcloud beta container fleet memberships delete`).
|
||||
2. Removing the corresponding in-cluster Kubernetes Resources that make the
|
||||
cluster exclusive to one Fleet (a.k.a `kubectl delete memberships
|
||||
membership`).
|
||||
3. Uninstalling the Connect Agent from this cluster (a.k.a
|
||||
`kubectl delete on the gke-connect namespace`).
|
||||
|
||||
The unregister command makes additional internal checks to ensure that all
|
||||
three steps can be safely done to properly clean-up in-Fleet and in-cluster
|
||||
resources.
|
||||
|
||||
To register a non-GKE cluster use --context flag (with an optional
|
||||
--kubeconfig flag).
|
||||
|
||||
To register a GKE cluster use --gke-cluster or --gke-uri flag (no
|
||||
--kubeconfig flag is required).
|
||||
|
||||
To only delete the Fleet membership resource, consider using the command:
|
||||
gcloud beta container fleet memberships delete. This command is intended to
|
||||
delete stale Fleet Membership resources as doing so on a fully registered
|
||||
cluster will skip some of the steps above and orphan in-cluster resources
|
||||
and agent connections to Google.
|
||||
|
||||
EXAMPLES
|
||||
Unregister a non-GKE cluster referenced from a specific kubeconfig file:
|
||||
|
||||
$ gcloud beta container fleet memberships unregister my-membership \
|
||||
--context=my-cluster-context \
|
||||
--kubeconfig=/home/user/custom_kubeconfig
|
||||
|
||||
Unregister a non-GKE cluster referenced from the default kubeconfig file:
|
||||
|
||||
$ gcloud beta container fleet memberships unregister my-membership \
|
||||
--context=my-cluster-context
|
||||
|
||||
Unregister a GKE cluster referenced from a GKE URI:
|
||||
|
||||
$ gcloud beta container fleet memberships unregister my-membership \
|
||||
--gke-uri=my-cluster-gke-uri
|
||||
|
||||
Unregister a GKE cluster referenced from a GKE Cluster location and name:
|
||||
|
||||
$ gcloud beta container fleet memberships unregister my-membership \
|
||||
--gke-cluster=my-cluster-region-or-zone/my-cluster
|
||||
|
||||
POSITIONAL ARGUMENTS
|
||||
CLUSTER_NAME
|
||||
The membership name that corresponds to the cluster being unregistered.
|
||||
To get list of all the memberships on the Fleet, consider using the
|
||||
command: gcloud beta container fleet memberships list.
|
||||
|
||||
REQUIRED FLAGS
|
||||
Cluster identifier.
|
||||
|
||||
Exactly one of these must be specified:
|
||||
|
||||
--gke-cluster=LOCATION/CLUSTER_NAME
|
||||
The location/name of the GKE cluster. The location can be a zone or a
|
||||
region for e.g us-central1-a/my-cluster.
|
||||
|
||||
--gke-uri=GKE_URI
|
||||
The URI of a GKE cluster that you want to register to Hub; for
|
||||
example,
|
||||
'https://container.googleapis.com/v1/projects/my-project/locations/us-central1-a/clusters/my-cluster'.
|
||||
To obtain the URI, you can run 'gcloud container clusters list
|
||||
--uri'. Note that this should only be provided if the cluster being
|
||||
registered is a GKE cluster. The service will validate the provided
|
||||
URI to confirm that it maps to a valid GKE cluster."
|
||||
|
||||
Non-GKE cluster identifier.
|
||||
|
||||
--context=CONTEXT
|
||||
The cluster context as it appears in the kubeconfig file. You can
|
||||
get this value from the command line by running command: kubectl
|
||||
config current-context.
|
||||
|
||||
This flag must be specified if any of the other arguments in this
|
||||
group are specified.
|
||||
|
||||
--kubeconfig=KUBECONFIG
|
||||
The kubeconfig file containing an entry for the cluster. Defaults
|
||||
to $KUBECONFIG if it is set in the environment, otherwise defaults
|
||||
to $HOME/.kube/config.
|
||||
|
||||
GCLOUD WIDE FLAGS
|
||||
These flags are available to all commands: --access-token-file, --account,
|
||||
--billing-project, --configuration, --flags-file, --flatten, --format,
|
||||
--help, --impersonate-service-account, --log-http, --project, --quiet,
|
||||
--trace-token, --user-output-enabled, --verbosity.
|
||||
|
||||
Run $ gcloud help for details.
|
||||
|
||||
NOTES
|
||||
This command is currently in beta and might change without notice. These
|
||||
variants are also available:
|
||||
|
||||
$ gcloud container fleet memberships unregister
|
||||
|
||||
$ gcloud alpha container fleet memberships unregister
|
||||
|
||||
99
gcloud/beta/container/fleet/memberships/update
Normal file
99
gcloud/beta/container/fleet/memberships/update
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
NAME
|
||||
gcloud beta container fleet memberships update - update a membership
|
||||
|
||||
SYNOPSIS
|
||||
gcloud beta container fleet memberships update
|
||||
(MEMBERSHIP : --location=LOCATION) [--async]
|
||||
[--update-labels=[KEY=VALUE,...]]
|
||||
[--clear-labels | --remove-labels=[KEY,...]] [GCLOUD_WIDE_FLAG ...]
|
||||
|
||||
DESCRIPTION
|
||||
(BETA) Update an existing membership in Fleet.
|
||||
|
||||
EXAMPLES
|
||||
Update a membership for a cluster:
|
||||
|
||||
$ gcloud beta container fleet memberships update a-membership
|
||||
|
||||
POSITIONAL ARGUMENTS
|
||||
Membership resource - membership resource representing a cluster in Fleet.
|
||||
The arguments in this group can be used to specify the attributes of this
|
||||
resource. (NOTE) Some attributes are not given arguments in this group but
|
||||
can be set in other ways. To set the project attribute:
|
||||
◆ provide the argument membership on the command line with a fully
|
||||
specified name;
|
||||
◆ set the property core/project;
|
||||
◆ provide the argument --project on the command line.
|
||||
|
||||
This must be specified.
|
||||
|
||||
MEMBERSHIP
|
||||
ID of the membership or fully qualified identifier for the
|
||||
membership. To set the membership attribute:
|
||||
▸ provide the argument membership on the command line.
|
||||
|
||||
This positional must be specified if any of the other arguments in
|
||||
this group are specified.
|
||||
|
||||
--location=LOCATION
|
||||
The location name. To set the location attribute:
|
||||
▸ provide the argument membership on the command line with a fully
|
||||
specified name;
|
||||
▸ provide the argument --location on the command line;
|
||||
▸ global is the only supported location.
|
||||
|
||||
FLAGS
|
||||
--async
|
||||
Return immediately, without waiting for the operation in progress to
|
||||
complete.
|
||||
|
||||
--update-labels=[KEY=VALUE,...]
|
||||
List of label KEY=VALUE pairs to update. If a label exists, its value
|
||||
is modified. Otherwise, a new label is created.
|
||||
|
||||
Keys must start with a lowercase character and contain only hyphens
|
||||
(-), underscores (_), lowercase characters, and numbers. Values must
|
||||
contain only hyphens (-), underscores (_), lowercase characters, and
|
||||
numbers.
|
||||
|
||||
At most one of these can be specified:
|
||||
|
||||
--clear-labels
|
||||
Remove all labels. If --update-labels is also specified then
|
||||
--clear-labels is applied first.
|
||||
|
||||
For example, to remove all labels:
|
||||
|
||||
$ gcloud beta container fleet memberships update --clear-labels
|
||||
|
||||
To remove all existing labels and create two new labels, foo and baz:
|
||||
|
||||
$ gcloud beta container fleet memberships update --clear-labels \
|
||||
--update-labels foo=bar,baz=qux
|
||||
|
||||
--remove-labels=[KEY,...]
|
||||
List of label keys to remove. If a label does not exist it is
|
||||
silently ignored. If --update-labels is also specified then
|
||||
--update-labels is applied first.
|
||||
|
||||
GCLOUD WIDE FLAGS
|
||||
These flags are available to all commands: --access-token-file, --account,
|
||||
--billing-project, --configuration, --flags-file, --flatten, --format,
|
||||
--help, --impersonate-service-account, --log-http, --project, --quiet,
|
||||
--trace-token, --user-output-enabled, --verbosity.
|
||||
|
||||
Run $ gcloud help for details.
|
||||
|
||||
API REFERENCE
|
||||
This command uses the gkehub/v1beta1 API. The full documentation for this
|
||||
API can be found at:
|
||||
https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster
|
||||
|
||||
NOTES
|
||||
This command is currently in beta and might change without notice. These
|
||||
variants are also available:
|
||||
|
||||
$ gcloud container fleet memberships update
|
||||
|
||||
$ gcloud alpha container fleet memberships update
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue