Skip to content

Commit 1251826

Browse files
committed
installation instructions
Signed-off-by: Ankita Thomas <ankithom@redhat.com>
1 parent 64e25d2 commit 1251826

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-0
lines changed

.claude/commands/operator.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ You have access to comprehensive documentation in `olmv1.md` which covers all ol
1212
2. **Use the documented workflows** in the "Recommended Workflows" section
1313
3. **Reference specific error scenarios** from the documentation when troubleshooting
1414

15+
## Initial setup
16+
Before helping the user, ensure that the `kubectl-operator` plugin is installed and has the `olmv1` subcommand. This can be verified by running `kubectl operator olmv1`, which should not fail.
17+
If this fails with an `unknown command` error, ensure that kubectl-operator is installed correctly following the steps in the `Installing from source` section on the `README.md` at the root level of the `kubectl-operator` repository.
18+
1519
## Available Commands
1620

1721
The kubectl operator plugin has two main command sets:

README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,49 @@ The `kubectl operator` plugin is distributed via [`krew`](https://krew.sigs.k8s.
1919
```console
2020
kubectl krew install operator
2121
```
22+
23+
# Installing from source
24+
25+
Prerequisites:
26+
- [go 1.23.4+](https://go.dev/dl/)
27+
- `GOPATH` environment variable must be set.
28+
29+
To build the latest version from the repository, run `make install`. This should install the kubectl-operator plugin to the `$GOPATH`/bin directory.
30+
31+
To enable `kubectl` to discover the plugin, ensure that the '$GOPATH'/bin directory is either part of the '$PATH' environment variable, or that the newly installed `kubectl-operator` is moved to a directory in the `$PATH`.
32+
33+
You should see that the plugin has successfully installed:
34+
```bash
35+
$ kubectl operator
36+
37+
Manage operators in a cluster from the command line.
38+
39+
kubectl operator helps you manage operator installations in your
40+
cluster. It can install and uninstall operator catalogs, list
41+
operators available for installation, and install and uninstall
42+
operators from the installed catalogs.
43+
44+
Usage:
45+
operator [command]
46+
47+
Available Commands:
48+
catalog Manage operator catalogs
49+
completion Generate the autocompletion script for the specified shell
50+
describe Describe an operator
51+
help Help about any command
52+
install Install an operator
53+
list List installed operators
54+
list-available List operators available to be installed
55+
list-operands List operands of an installed operator
56+
olmv1 Manage OLMv1 extensions and catalogs
57+
uninstall Uninstall an operator and operands
58+
upgrade Upgrade an operator
59+
version Print version information
60+
61+
Flags:
62+
-h, --help help for operator
63+
-n, --namespace string If present, namespace scope for this CLI request
64+
--timeout duration The amount of time to wait before giving up on an operation. (default 1m0s)
65+
66+
Use "operator [command] --help" for more information about a command.
67+
```

0 commit comments

Comments
 (0)