mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-15 22:20:51 +00:00
Merge pull request #10604 from nikhiljindal/v1
Updating scripts to use v1 instead of v1beta3
This commit is contained in:
@@ -185,7 +185,7 @@ function run-until-success() {
|
||||
# $1 object type
|
||||
function get-addons-from-server() {
|
||||
local -r obj_type=$1
|
||||
"${KUBECTL}" get "${obj_type}" -o template -t "{{range.items}}{{.metadata.name}} {{end}}" --api-version=v1beta3 -l kubernetes.io/cluster-service=true
|
||||
"${KUBECTL}" get "${obj_type}" -o template -t "{{range.items}}{{.metadata.name}} {{end}}" --api-version=v1 -l kubernetes.io/cluster-service=true
|
||||
}
|
||||
|
||||
# returns the characters after the last separator (including)
|
||||
|
@@ -76,7 +76,7 @@ EOF
|
||||
|
||||
local -r kubeconfig_base64=$(echo "${kubeconfig}" | base64 -w0)
|
||||
read -r -d '' secretyaml <<EOF
|
||||
apiVersion: v1beta3
|
||||
apiVersion: v1
|
||||
data:
|
||||
kubeconfig: ${kubeconfig_base64}
|
||||
kind: Secret
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"kind": "ReplicationController",
|
||||
"apiVersion": "v1beta3",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "nettest-controller",
|
||||
"labels": {
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1beta3",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "nettest",
|
||||
"labels": {
|
||||
|
@@ -1,4 +1,4 @@
|
||||
apiVersion: v1beta3
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
labels:
|
||||
|
@@ -1,9 +1,9 @@
|
||||
apiVersion: v1beta3
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: blog-service
|
||||
spec:
|
||||
createExternalLoadBalancer: true
|
||||
type: "LoadBalancer"
|
||||
ports:
|
||||
- port: 80
|
||||
selector:
|
||||
|
@@ -1,4 +1,4 @@
|
||||
apiVersion: v1beta3
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
labels:
|
||||
|
@@ -1,4 +1,4 @@
|
||||
apiVersion: v1beta3
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
labels:
|
||||
|
@@ -43,7 +43,7 @@ Now, you can access the service `wget 10.0.1.89:9090`, and build graphs.
|
||||
|
||||
## How it works
|
||||
|
||||
This is a v1beta3 based, containerized prometheus ReplicationController, which scrapes endpoints which are readable on the KUBERNETES service (the internal kubernetes service running in the default namespace, which is visible to all pods).
|
||||
This is a v1 api based, containerized prometheus ReplicationController, which scrapes endpoints which are readable on the KUBERNETES service (the internal kubernetes service running in the default namespace, which is visible to all pods).
|
||||
|
||||
1. Use kubectl to handle auth & proxy the kubernetes API locally, emulating the old KUBERNETES_RO service.
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"apiVersion": "v1beta3",
|
||||
"apiVersion": "v1",
|
||||
"kind": "ReplicationController",
|
||||
"metadata": {
|
||||
"labels": {
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"kind":"Service",
|
||||
"apiVersion":"v1beta3",
|
||||
"apiVersion":"v1",
|
||||
"metadata":{
|
||||
"name":"prometheus",
|
||||
"labels":{
|
||||
@@ -8,7 +8,7 @@
|
||||
}
|
||||
},
|
||||
"spec":{
|
||||
"publicIPs":["10.0.1.89"],
|
||||
"type": "NodePort",
|
||||
"ports": [
|
||||
{
|
||||
"port":9090,
|
||||
|
Reference in New Issue
Block a user