Fix Openshift SecurityContextConstraints based on Vizier changes by ddelnano · Pull Request #291 · pixie-io/docs.px.dev

@ddelnano

Signed-off-by: Dom Del Nano <ddelnano@gmail.com>

ddelnano added a commit to pixie-io/pixie that referenced this pull request

Nov 25, 2024
Summary: Update cli to detect OpenShift and provide notice to install
SCC

This updates `px deploy` to detect OpenShift clusters. In addition, it
also prompts a user that they need to install a
SecurityContextConstraint before continuing with the deployment. Note:
the existing SCC instructions no longer work. I've raised
pixie-io/docs.px.dev#291 and verified that a
pixie deploy works properly with the updated instructions.

Relevant Issues: N/A

Type of change: /kind feature

Test Plan: Verified the following with a locally built `px` cli
- [x] deploy command prints appropriate message when KUBECONFIG set to
OpenShift cluster
```
$ oc status
Warning: apps.openshift.io/v1 DeploymentConfig is deprecated in v4.14+, unavailable in v4.10000+
In project default on server https://api.test-openshift.testing.getcosmic.ai:6443

svc/openshift - kubernetes.default.svc.cluster.local
svc/kubernetes - 172.30.0.1:443 -> 6443

View details with 'oc describe <resource>/<name>' or list resources with 'oc get all'.

$ ./px deploy
Pixie CLI

Running Cluster Checks:
 ✔    Kernel version > 4.14.0
 ✔    Cluster type is supported
 ✔    K8s version > 1.16.0
 ✔    Kubectl > 1.10.0 is present
 ✔    User can create namespace
 ✕    Cluster type is in list of known supported types  ERR: openshift cluster detected. Please note that a Security Context Constraint (SCC) is required to run Pixie. Install a SCC in the namespace designated for
 ✕    Cluster type is in list of known supported types  ERR: openshift cluster detected. Please note that a Security Context Constraint (SCC) is required to run Pixie. Install a SCC in the namespace designated for the Pixie install before continuing. See example on https://docs.px.dev/reference/admin/environment-configs/
Some cluster checks failed. Pixie may not work properly on your cluster. Continue with deploy? (y/n) [y] : ^C
```
- Verified that `oc status` returns with a non-zero exit status if
KUBECONFIG points to a different k8s cluster
```
$ kubectl get nodes
NAME                                                  STATUS   ROLES    AGE   VERSION
gke-dev-cluster-ddelnano-default-pool-a27c1ac2-fh3l   Ready    <none>   26d   v1.30.5-gke.1014001
gke-dev-cluster-ddelnano-default-pool-a27c1ac2-qbqs   Ready    <none>   13d   v1.30.5-gke.1014001

$ oc status; echo $?
error: you do not have rights to view project "default" specified in your config or the project doesn't exist
1
```

Changelog Message: Enhanced the `px` cli to detect OpenShift clusters
and prompt to install the appropriate SecurityContextConstraints before
proceeding with a deploy

Signed-off-by: Dom Del Nano <ddelnano@gmail.com>

@ddelnano ddelnano deleted the ddelnano/fix-openshift-docs branch

December 3, 2024 18:59

ddelnano added a commit to ddelnano/pixie that referenced this pull request

Dec 9, 2024
…ie-io#2048)

Summary: Update cli to detect OpenShift and provide notice to install
SCC

This updates `px deploy` to detect OpenShift clusters. In addition, it
also prompts a user that they need to install a
SecurityContextConstraint before continuing with the deployment. Note:
the existing SCC instructions no longer work. I've raised
pixie-io/docs.px.dev#291 and verified that a
pixie deploy works properly with the updated instructions.

Relevant Issues: N/A

Type of change: /kind feature

Test Plan: Verified the following with a locally built `px` cli
- [x] deploy command prints appropriate message when KUBECONFIG set to
OpenShift cluster
```
$ oc status
Warning: apps.openshift.io/v1 DeploymentConfig is deprecated in v4.14+, unavailable in v4.10000+
In project default on server https://api.test-openshift.testing.getcosmic.ai:6443

svc/openshift - kubernetes.default.svc.cluster.local
svc/kubernetes - 172.30.0.1:443 -> 6443

View details with 'oc describe <resource>/<name>' or list resources with 'oc get all'.

$ ./px deploy
Pixie CLI

Running Cluster Checks:
 ✔    Kernel version > 4.14.0
 ✔    Cluster type is supported
 ✔    K8s version > 1.16.0
 ✔    Kubectl > 1.10.0 is present
 ✔    User can create namespace
 ✕    Cluster type is in list of known supported types  ERR: openshift cluster detected. Please note that a Security Context Constraint (SCC) is required to run Pixie. Install a SCC in the namespace designated for
 ✕    Cluster type is in list of known supported types  ERR: openshift cluster detected. Please note that a Security Context Constraint (SCC) is required to run Pixie. Install a SCC in the namespace designated for the Pixie install before continuing. See example on https://docs.px.dev/reference/admin/environment-configs/
Some cluster checks failed. Pixie may not work properly on your cluster. Continue with deploy? (y/n) [y] : ^C
```
- Verified that `oc status` returns with a non-zero exit status if
KUBECONFIG points to a different k8s cluster
```
$ kubectl get nodes
NAME                                                  STATUS   ROLES    AGE   VERSION
gke-dev-cluster-ddelnano-default-pool-a27c1ac2-fh3l   Ready    <none>   26d   v1.30.5-gke.1014001
gke-dev-cluster-ddelnano-default-pool-a27c1ac2-qbqs   Ready    <none>   13d   v1.30.5-gke.1014001

$ oc status; echo $?
error: you do not have rights to view project "default" specified in your config or the project doesn't exist
1
```

Changelog Message: Enhanced the `px` cli to detect OpenShift clusters
and prompt to install the appropriate SecurityContextConstraints before
proceeding with a deploy

Signed-off-by: Dom Del Nano <ddelnano@gmail.com>

ddelnano added a commit to ddelnano/pixie that referenced this pull request

Aug 6, 2025
…ie-io#2048)

Summary: Update cli to detect OpenShift and provide notice to install
SCC

This updates `px deploy` to detect OpenShift clusters. In addition, it
also prompts a user that they need to install a
SecurityContextConstraint before continuing with the deployment. Note:
the existing SCC instructions no longer work. I've raised
pixie-io/docs.px.dev#291 and verified that a
pixie deploy works properly with the updated instructions.

Relevant Issues: N/A

Type of change: /kind feature

Test Plan: Verified the following with a locally built `px` cli
- [x] deploy command prints appropriate message when KUBECONFIG set to
OpenShift cluster
```
$ oc status
Warning: apps.openshift.io/v1 DeploymentConfig is deprecated in v4.14+, unavailable in v4.10000+
In project default on server https://api.test-openshift.testing.getcosmic.ai:6443

svc/openshift - kubernetes.default.svc.cluster.local
svc/kubernetes - 172.30.0.1:443 -> 6443

View details with 'oc describe <resource>/<name>' or list resources with 'oc get all'.

$ ./px deploy
Pixie CLI

Running Cluster Checks:
 ✔    Kernel version > 4.14.0
 ✔    Cluster type is supported
 ✔    K8s version > 1.16.0
 ✔    Kubectl > 1.10.0 is present
 ✔    User can create namespace
 ✕    Cluster type is in list of known supported types  ERR: openshift cluster detected. Please note that a Security Context Constraint (SCC) is required to run Pixie. Install a SCC in the namespace designated for
 ✕    Cluster type is in list of known supported types  ERR: openshift cluster detected. Please note that a Security Context Constraint (SCC) is required to run Pixie. Install a SCC in the namespace designated for the Pixie install before continuing. See example on https://docs.px.dev/reference/admin/environment-configs/
Some cluster checks failed. Pixie may not work properly on your cluster. Continue with deploy? (y/n) [y] : ^C
```
- Verified that `oc status` returns with a non-zero exit status if
KUBECONFIG points to a different k8s cluster
```
$ kubectl get nodes
NAME                                                  STATUS   ROLES    AGE   VERSION
gke-dev-cluster-ddelnano-default-pool-a27c1ac2-fh3l   Ready    <none>   26d   v1.30.5-gke.1014001
gke-dev-cluster-ddelnano-default-pool-a27c1ac2-qbqs   Ready    <none>   13d   v1.30.5-gke.1014001

$ oc status; echo $?
error: you do not have rights to view project "default" specified in your config or the project doesn't exist
1
```

Changelog Message: Enhanced the `px` cli to detect OpenShift clusters
and prompt to install the appropriate SecurityContextConstraints before
proceeding with a deploy

Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
GitOrigin-RevId: 8540621

ddelnano added a commit to csmc-io/pixie that referenced this pull request

Jan 8, 2026
Summary: Update cli to detect OpenShift and provide notice to install
SCC

This updates `px deploy` to detect OpenShift clusters. In addition, it
also prompts a user that they need to install a
SecurityContextConstraint before continuing with the deployment. Note:
the existing SCC instructions no longer work. I've raised
pixie-io/docs.px.dev#291 and verified that a
pixie deploy works properly with the updated instructions.

Relevant Issues: N/A

Type of change: /kind feature

Test Plan: Verified the following with a locally built `px` cli
- [x] deploy command prints appropriate message when KUBECONFIG set to
OpenShift cluster
```
$ oc status
Warning: apps.openshift.io/v1 DeploymentConfig is deprecated in v4.14+, unavailable in v4.10000+
In project default on server https://api.test-openshift.testing.getcosmic.ai:6443

svc/openshift - kubernetes.default.svc.cluster.local
svc/kubernetes - 172.30.0.1:443 -> 6443

View details with 'oc describe <resource>/<name>' or list resources with 'oc get all'.

$ ./px deploy
Pixie CLI

Running Cluster Checks:
 ✔    Kernel version > 4.14.0
 ✔    Cluster type is supported
 ✔    K8s version > 1.16.0
 ✔    Kubectl > 1.10.0 is present
 ✔    User can create namespace
 ✕    Cluster type is in list of known supported types  ERR: openshift cluster detected. Please note that a Security Context Constraint (SCC) is required to run Pixie. Install a SCC in the namespace designated for
 ✕    Cluster type is in list of known supported types  ERR: openshift cluster detected. Please note that a Security Context Constraint (SCC) is required to run Pixie. Install a SCC in the namespace designated for the Pixie install before continuing. See example on https://docs.px.dev/reference/admin/environment-configs/
Some cluster checks failed. Pixie may not work properly on your cluster. Continue with deploy? (y/n) [y] : ^C
```
- Verified that `oc status` returns with a non-zero exit status if
KUBECONFIG points to a different k8s cluster
```
$ kubectl get nodes
NAME                                                  STATUS   ROLES    AGE   VERSION
gke-dev-cluster-ddelnano-default-pool-a27c1ac2-fh3l   Ready    <none>   26d   v1.30.5-gke.1014001
gke-dev-cluster-ddelnano-default-pool-a27c1ac2-qbqs   Ready    <none>   13d   v1.30.5-gke.1014001

$ oc status; echo $?
error: you do not have rights to view project "default" specified in your config or the project doesn't exist
1
```

Changelog Message: Enhanced the `px` cli to detect OpenShift clusters
and prompt to install the appropriate SecurityContextConstraints before
proceeding with a deploy

Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
GitOrigin-RevId: 8540621

ddelnano added a commit to csmc-io/pixie that referenced this pull request

Jan 8, 2026
Summary: Update cli to detect OpenShift and provide notice to install
SCC

This updates `px deploy` to detect OpenShift clusters. In addition, it
also prompts a user that they need to install a
SecurityContextConstraint before continuing with the deployment. Note:
the existing SCC instructions no longer work. I've raised
pixie-io/docs.px.dev#291 and verified that a
pixie deploy works properly with the updated instructions.

Relevant Issues: N/A

Type of change: /kind feature

Test Plan: Verified the following with a locally built `px` cli
- [x] deploy command prints appropriate message when KUBECONFIG set to
OpenShift cluster
```
$ oc status
Warning: apps.openshift.io/v1 DeploymentConfig is deprecated in v4.14+, unavailable in v4.10000+
In project default on server https://api.test-openshift.testing.getcosmic.ai:6443

svc/openshift - kubernetes.default.svc.cluster.local
svc/kubernetes - 172.30.0.1:443 -> 6443

View details with 'oc describe <resource>/<name>' or list resources with 'oc get all'.

$ ./px deploy
Pixie CLI

Running Cluster Checks:
 ✔    Kernel version > 4.14.0
 ✔    Cluster type is supported
 ✔    K8s version > 1.16.0
 ✔    Kubectl > 1.10.0 is present
 ✔    User can create namespace
 ✕    Cluster type is in list of known supported types  ERR: openshift cluster detected. Please note that a Security Context Constraint (SCC) is required to run Pixie. Install a SCC in the namespace designated for
 ✕    Cluster type is in list of known supported types  ERR: openshift cluster detected. Please note that a Security Context Constraint (SCC) is required to run Pixie. Install a SCC in the namespace designated for the Pixie install before continuing. See example on https://docs.px.dev/reference/admin/environment-configs/
Some cluster checks failed. Pixie may not work properly on your cluster. Continue with deploy? (y/n) [y] : ^C
```
- Verified that `oc status` returns with a non-zero exit status if
KUBECONFIG points to a different k8s cluster
```
$ kubectl get nodes
NAME                                                  STATUS   ROLES    AGE   VERSION
gke-dev-cluster-ddelnano-default-pool-a27c1ac2-fh3l   Ready    <none>   26d   v1.30.5-gke.1014001
gke-dev-cluster-ddelnano-default-pool-a27c1ac2-qbqs   Ready    <none>   13d   v1.30.5-gke.1014001

$ oc status; echo $?
error: you do not have rights to view project "default" specified in your config or the project doesn't exist
1
```

Changelog Message: Enhanced the `px` cli to detect OpenShift clusters
and prompt to install the appropriate SecurityContextConstraints before
proceeding with a deploy

Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
GitOrigin-RevId: 8540621

ddelnano added a commit to csmc-io/pixie that referenced this pull request

Jan 8, 2026
Summary: Update cli to detect OpenShift and provide notice to install
SCC

This updates `px deploy` to detect OpenShift clusters. In addition, it
also prompts a user that they need to install a
SecurityContextConstraint before continuing with the deployment. Note:
the existing SCC instructions no longer work. I've raised
pixie-io/docs.px.dev#291 and verified that a
pixie deploy works properly with the updated instructions.

Relevant Issues: N/A

Type of change: /kind feature

Test Plan: Verified the following with a locally built `px` cli
- [x] deploy command prints appropriate message when KUBECONFIG set to
OpenShift cluster
```
$ oc status
Warning: apps.openshift.io/v1 DeploymentConfig is deprecated in v4.14+, unavailable in v4.10000+
In project default on server https://api.test-openshift.testing.getcosmic.ai:6443

svc/openshift - kubernetes.default.svc.cluster.local
svc/kubernetes - 172.30.0.1:443 -> 6443

View details with 'oc describe <resource>/<name>' or list resources with 'oc get all'.

$ ./px deploy
Pixie CLI

Running Cluster Checks:
 ✔    Kernel version > 4.14.0
 ✔    Cluster type is supported
 ✔    K8s version > 1.16.0
 ✔    Kubectl > 1.10.0 is present
 ✔    User can create namespace
 ✕    Cluster type is in list of known supported types  ERR: openshift cluster detected. Please note that a Security Context Constraint (SCC) is required to run Pixie. Install a SCC in the namespace designated for
 ✕    Cluster type is in list of known supported types  ERR: openshift cluster detected. Please note that a Security Context Constraint (SCC) is required to run Pixie. Install a SCC in the namespace designated for the Pixie install before continuing. See example on https://docs.px.dev/reference/admin/environment-configs/
Some cluster checks failed. Pixie may not work properly on your cluster. Continue with deploy? (y/n) [y] : ^C
```
- Verified that `oc status` returns with a non-zero exit status if
KUBECONFIG points to a different k8s cluster
```
$ kubectl get nodes
NAME                                                  STATUS   ROLES    AGE   VERSION
gke-dev-cluster-ddelnano-default-pool-a27c1ac2-fh3l   Ready    <none>   26d   v1.30.5-gke.1014001
gke-dev-cluster-ddelnano-default-pool-a27c1ac2-qbqs   Ready    <none>   13d   v1.30.5-gke.1014001

$ oc status; echo $?
error: you do not have rights to view project "default" specified in your config or the project doesn't exist
1
```

Changelog Message: Enhanced the `px` cli to detect OpenShift clusters
and prompt to install the appropriate SecurityContextConstraints before
proceeding with a deploy

Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
GitOrigin-RevId: 8540621

ddelnano added a commit to csmc-io/pixie that referenced this pull request

Jan 16, 2026
Summary: Update cli to detect OpenShift and provide notice to install
SCC

This updates `px deploy` to detect OpenShift clusters. In addition, it
also prompts a user that they need to install a
SecurityContextConstraint before continuing with the deployment. Note:
the existing SCC instructions no longer work. I've raised
pixie-io/docs.px.dev#291 and verified that a
pixie deploy works properly with the updated instructions.

Relevant Issues: N/A

Type of change: /kind feature

Test Plan: Verified the following with a locally built `px` cli
- [x] deploy command prints appropriate message when KUBECONFIG set to
OpenShift cluster
```
$ oc status
Warning: apps.openshift.io/v1 DeploymentConfig is deprecated in v4.14+, unavailable in v4.10000+
In project default on server https://api.test-openshift.testing.getcosmic.ai:6443

svc/openshift - kubernetes.default.svc.cluster.local
svc/kubernetes - 172.30.0.1:443 -> 6443

View details with 'oc describe <resource>/<name>' or list resources with 'oc get all'.

$ ./px deploy
Pixie CLI

Running Cluster Checks:
 ✔    Kernel version > 4.14.0
 ✔    Cluster type is supported
 ✔    K8s version > 1.16.0
 ✔    Kubectl > 1.10.0 is present
 ✔    User can create namespace
 ✕    Cluster type is in list of known supported types  ERR: openshift cluster detected. Please note that a Security Context Constraint (SCC) is required to run Pixie. Install a SCC in the namespace designated for
 ✕    Cluster type is in list of known supported types  ERR: openshift cluster detected. Please note that a Security Context Constraint (SCC) is required to run Pixie. Install a SCC in the namespace designated for the Pixie install before continuing. See example on https://docs.px.dev/reference/admin/environment-configs/
Some cluster checks failed. Pixie may not work properly on your cluster. Continue with deploy? (y/n) [y] : ^C
```
- Verified that `oc status` returns with a non-zero exit status if
KUBECONFIG points to a different k8s cluster
```
$ kubectl get nodes
NAME                                                  STATUS   ROLES    AGE   VERSION
gke-dev-cluster-ddelnano-default-pool-a27c1ac2-fh3l   Ready    <none>   26d   v1.30.5-gke.1014001
gke-dev-cluster-ddelnano-default-pool-a27c1ac2-qbqs   Ready    <none>   13d   v1.30.5-gke.1014001

$ oc status; echo $?
error: you do not have rights to view project "default" specified in your config or the project doesn't exist
1
```

Changelog Message: Enhanced the `px` cli to detect OpenShift clusters
and prompt to install the appropriate SecurityContextConstraints before
proceeding with a deploy

Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
GitOrigin-RevId: 8540621

ddelnano added a commit to k8sstormcenter/pixie that referenced this pull request

Feb 25, 2026
…ie-io#2048)

Summary: Update cli to detect OpenShift and provide notice to install
SCC

This updates `px deploy` to detect OpenShift clusters. In addition, it
also prompts a user that they need to install a
SecurityContextConstraint before continuing with the deployment. Note:
the existing SCC instructions no longer work. I've raised
pixie-io/docs.px.dev#291 and verified that a
pixie deploy works properly with the updated instructions.

Relevant Issues: N/A

Type of change: /kind feature

Test Plan: Verified the following with a locally built `px` cli
- [x] deploy command prints appropriate message when KUBECONFIG set to
OpenShift cluster
```
$ oc status
Warning: apps.openshift.io/v1 DeploymentConfig is deprecated in v4.14+, unavailable in v4.10000+
In project default on server https://api.test-openshift.testing.getcosmic.ai:6443

svc/openshift - kubernetes.default.svc.cluster.local
svc/kubernetes - 172.30.0.1:443 -> 6443

View details with 'oc describe <resource>/<name>' or list resources with 'oc get all'.

$ ./px deploy
Pixie CLI

Running Cluster Checks:
 ✔    Kernel version > 4.14.0
 ✔    Cluster type is supported
 ✔    K8s version > 1.16.0
 ✔    Kubectl > 1.10.0 is present
 ✔    User can create namespace
 ✕    Cluster type is in list of known supported types  ERR: openshift cluster detected. Please note that a Security Context Constraint (SCC) is required to run Pixie. Install a SCC in the namespace designated for
 ✕    Cluster type is in list of known supported types  ERR: openshift cluster detected. Please note that a Security Context Constraint (SCC) is required to run Pixie. Install a SCC in the namespace designated for the Pixie install before continuing. See example on https://docs.px.dev/reference/admin/environment-configs/
Some cluster checks failed. Pixie may not work properly on your cluster. Continue with deploy? (y/n) [y] : ^C
```
- Verified that `oc status` returns with a non-zero exit status if
KUBECONFIG points to a different k8s cluster
```
$ kubectl get nodes
NAME                                                  STATUS   ROLES    AGE   VERSION
gke-dev-cluster-ddelnano-default-pool-a27c1ac2-fh3l   Ready    <none>   26d   v1.30.5-gke.1014001
gke-dev-cluster-ddelnano-default-pool-a27c1ac2-qbqs   Ready    <none>   13d   v1.30.5-gke.1014001

$ oc status; echo $?
error: you do not have rights to view project "default" specified in your config or the project doesn't exist
1
```

Changelog Message: Enhanced the `px` cli to detect OpenShift clusters
and prompt to install the appropriate SecurityContextConstraints before
proceeding with a deploy

Signed-off-by: Dom Del Nano <ddelnano@gmail.com>

ddelnano added a commit to k8sstormcenter/pixie that referenced this pull request

Feb 25, 2026
…ie-io#2048)

Summary: Update cli to detect OpenShift and provide notice to install
SCC

This updates `px deploy` to detect OpenShift clusters. In addition, it
also prompts a user that they need to install a
SecurityContextConstraint before continuing with the deployment. Note:
the existing SCC instructions no longer work. I've raised
pixie-io/docs.px.dev#291 and verified that a
pixie deploy works properly with the updated instructions.

Relevant Issues: N/A

Type of change: /kind feature

Test Plan: Verified the following with a locally built `px` cli
- [x] deploy command prints appropriate message when KUBECONFIG set to
OpenShift cluster
```
$ oc status
Warning: apps.openshift.io/v1 DeploymentConfig is deprecated in v4.14+, unavailable in v4.10000+
In project default on server https://api.test-openshift.testing.getcosmic.ai:6443

svc/openshift - kubernetes.default.svc.cluster.local
svc/kubernetes - 172.30.0.1:443 -> 6443

View details with 'oc describe <resource>/<name>' or list resources with 'oc get all'.

$ ./px deploy
Pixie CLI

Running Cluster Checks:
 ✔    Kernel version > 4.14.0
 ✔    Cluster type is supported
 ✔    K8s version > 1.16.0
 ✔    Kubectl > 1.10.0 is present
 ✔    User can create namespace
 ✕    Cluster type is in list of known supported types  ERR: openshift cluster detected. Please note that a Security Context Constraint (SCC) is required to run Pixie. Install a SCC in the namespace designated for
 ✕    Cluster type is in list of known supported types  ERR: openshift cluster detected. Please note that a Security Context Constraint (SCC) is required to run Pixie. Install a SCC in the namespace designated for the Pixie install before continuing. See example on https://docs.px.dev/reference/admin/environment-configs/
Some cluster checks failed. Pixie may not work properly on your cluster. Continue with deploy? (y/n) [y] : ^C
```
- Verified that `oc status` returns with a non-zero exit status if
KUBECONFIG points to a different k8s cluster
```
$ kubectl get nodes
NAME                                                  STATUS   ROLES    AGE   VERSION
gke-dev-cluster-ddelnano-default-pool-a27c1ac2-fh3l   Ready    <none>   26d   v1.30.5-gke.1014001
gke-dev-cluster-ddelnano-default-pool-a27c1ac2-qbqs   Ready    <none>   13d   v1.30.5-gke.1014001

$ oc status; echo $?
error: you do not have rights to view project "default" specified in your config or the project doesn't exist
1
```

Changelog Message: Enhanced the `px` cli to detect OpenShift clusters
and prompt to install the appropriate SecurityContextConstraints before
proceeding with a deploy

Signed-off-by: Dom Del Nano <ddelnano@gmail.com>

k8sstormcenter-buildbot pushed a commit to k8sstormcenter/pixie that referenced this pull request

Feb 26, 2026
…ie-io#2048)

Summary: Update cli to detect OpenShift and provide notice to install
SCC

This updates `px deploy` to detect OpenShift clusters. In addition, it
also prompts a user that they need to install a
SecurityContextConstraint before continuing with the deployment. Note:
the existing SCC instructions no longer work. I've raised
pixie-io/docs.px.dev#291 and verified that a
pixie deploy works properly with the updated instructions.

Relevant Issues: N/A

Type of change: /kind feature

Test Plan: Verified the following with a locally built `px` cli
- [x] deploy command prints appropriate message when KUBECONFIG set to
OpenShift cluster
```
$ oc status
Warning: apps.openshift.io/v1 DeploymentConfig is deprecated in v4.14+, unavailable in v4.10000+
In project default on server https://api.test-openshift.testing.getcosmic.ai:6443

svc/openshift - kubernetes.default.svc.cluster.local
svc/kubernetes - 172.30.0.1:443 -> 6443

View details with 'oc describe <resource>/<name>' or list resources with 'oc get all'.

$ ./px deploy
Pixie CLI

Running Cluster Checks:
 ✔    Kernel version > 4.14.0
 ✔    Cluster type is supported
 ✔    K8s version > 1.16.0
 ✔    Kubectl > 1.10.0 is present
 ✔    User can create namespace
 ✕    Cluster type is in list of known supported types  ERR: openshift cluster detected. Please note that a Security Context Constraint (SCC) is required to run Pixie. Install a SCC in the namespace designated for
 ✕    Cluster type is in list of known supported types  ERR: openshift cluster detected. Please note that a Security Context Constraint (SCC) is required to run Pixie. Install a SCC in the namespace designated for the Pixie install before continuing. See example on https://docs.px.dev/reference/admin/environment-configs/
Some cluster checks failed. Pixie may not work properly on your cluster. Continue with deploy? (y/n) [y] : ^C
```
- Verified that `oc status` returns with a non-zero exit status if
KUBECONFIG points to a different k8s cluster
```
$ kubectl get nodes
NAME                                                  STATUS   ROLES    AGE   VERSION
gke-dev-cluster-ddelnano-default-pool-a27c1ac2-fh3l   Ready    <none>   26d   v1.30.5-gke.1014001
gke-dev-cluster-ddelnano-default-pool-a27c1ac2-qbqs   Ready    <none>   13d   v1.30.5-gke.1014001

$ oc status; echo $?
error: you do not have rights to view project "default" specified in your config or the project doesn't exist
1
```

Changelog Message: Enhanced the `px` cli to detect OpenShift clusters
and prompt to install the appropriate SecurityContextConstraints before
proceeding with a deploy

Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
GitOrigin-RevId: 8540621