You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Configure `kubectl` for Oracle Container Engine for Kubernetes
2
2
3
-
Use this GitHub Action to install and configure `kubectl` to connect to
4
-
the specified [Oracle Container Engine for Kubernetes][OKE] (OKE) cluster.
3
+
Use this GitHub Action to install and configure `kubectl` to connect to the specified [Oracle Container Engine for Kubernetes][1] (OKE) cluster.
5
4
6
5
## Prerequisites
7
6
8
-
The target OKE cluster must have a **public Kubernetes API Endpoint** in
9
-
order for the GitHub Action to successfully connect to the cluster.
7
+
The target OKE cluster must have a **public Kubernetes API Endpoint** in order for the GitHub Action to successfully connect to the cluster.
10
8
11
-
The following [OCI CLI environment variables][1] must be defined for at least
12
-
the `configure-kubectl-oke` task:
9
+
The following [OCI CLI environment variables][2] must be defined for the workflow:
13
10
14
11
*`OCI_CLI_USER`
15
12
*`OCI_CLI_TENANCY`
16
13
*`OCI_CLI_FINGERPRINT`
17
14
*`OCI_CLI_KEY_CONTENT`
18
15
*`OCI_CLI_REGION`
19
16
20
-
We recommend using GitHub Secrets to store these values. [Defining your environment variables][2]
21
-
at the job or workflow level would allow multiple tasks/jobs to reduce
22
-
duplication.
17
+
We recommend using GitHub Secrets to store these values. [Defining your environment variables][3] at the job or workflow level would allow multiple tasks/jobs to reduce duplication.
23
18
24
19
## Inputs
25
20
26
21
*`cluster`: (Required) The OCID of the OKE cluster to configure
27
22
28
23
## Sample workflow steps
29
24
25
+
The following sample workflow configures `kubectl` for the `OKE_CLUSTER_OCID` OKE cluster.
26
+
30
27
```yaml
31
28
jobs:
32
29
install-kubectl:
@@ -41,56 +38,31 @@ jobs:
41
38
42
39
steps:
43
40
- name: Configure Kubectl
44
-
uses: oracle-actions/configure-kubectl-oke@v1
41
+
uses: oracle-actions/configure-kubectl-oke@v1.0
45
42
id: test-configure-kubectl-oke-action
46
43
with:
47
-
cluster: ${{ secrets.OKE_CLUSTER }}
44
+
cluster: ${{ secrets.OKE_CLUSTER_OCID }}
48
45
49
46
- name: Run Kubectl
50
47
run: kubectl get nodes -A
51
48
```
52
49
53
-
## Security recommendations
54
-
55
-
The **[Oracle Cloud Infrastructure Security Guide][OSG]** details our recommended
56
-
**[best practices for securing user authentication][BP]** which include:
57
-
58
-
* creating **a dedicated service user account** specifically for GitHub Actions;
59
-
* assigning that service account a **unique** and **complex** password;
60
-
* **rotating the API signing key pair** used by the service account every 90 days; and
61
-
* using **[GitHub encrypted secrets][GHS]** to store credentials.
62
-
63
-
> **Tip:** if you [create these secrets in your organization][SO], you can limited
64
-
> which repositories have access to these secrets while also avoiding duplicating
65
-
> the credentials in multiple repositories.
66
-
67
50
## Contributing
68
51
69
-
We welcome contributions from the community. Please review our [contribution guide][CG],
70
-
then [start a discussion][SD] or [open an issue][OI] and let us know what you'd
71
-
like to contribute.
52
+
We welcome contributions from the community. Before submitting a pull request, please [review our contribution guide][4].
72
53
73
54
## Security
74
55
75
-
Please consult the [security guide][SG] for our responsible security
76
-
vulnerability disclosure process.
56
+
Please consult the [security guide][5] for our responsible security vulnerability disclosure process.
77
57
78
58
## License
79
59
80
-
Copyright (c) 2021 Oracle and/or its affiliates.
81
-
82
-
Released under the Universal Permissive License v1.0 as shown at
0 commit comments