mirror of https://github.com/kubernetes/kops.git
K8s API
- Fixing Kubernetes API forwarding in the ELB - Fixing DNS for kubectul - Fixing Suggestions: output for bastion
This commit is contained in:
parent
78ecdb2165
commit
712882f080
|
|
@ -30,6 +30,7 @@ import (
|
||||||
"k8s.io/kops/upup/pkg/kutil"
|
"k8s.io/kops/upup/pkg/kutil"
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
"k8s.io/kops/pkg/apis/kops"
|
||||||
)
|
)
|
||||||
|
|
||||||
type UpdateClusterOptions struct {
|
type UpdateClusterOptions struct {
|
||||||
|
|
@ -188,7 +189,11 @@ func RunUpdateCluster(f *util.Factory, cmd *cobra.Command, args []string, out io
|
||||||
fmt.Printf("\n")
|
fmt.Printf("\n")
|
||||||
fmt.Printf("Suggestions:\n")
|
fmt.Printf("Suggestions:\n")
|
||||||
fmt.Printf(" * list nodes: kubectl get nodes --show-labels\n")
|
fmt.Printf(" * list nodes: kubectl get nodes --show-labels\n")
|
||||||
fmt.Printf(" * ssh to the master: ssh -i ~/.ssh/id_rsa admin@%s\n", cluster.Spec.MasterPublicName)
|
if cluster.Spec.Topology.Masters == kops.TopologyPublic {
|
||||||
|
fmt.Printf(" * ssh to the master: ssh -i ~/.ssh/id_rsa admin@%s\n", cluster.Spec.MasterPublicName)
|
||||||
|
}else {
|
||||||
|
fmt.Printf(" * ssh to the bastion: ssh -i ~/.ssh/id_rsa admin@%s\n", cluster.Spec.MasterPublicName)
|
||||||
|
}
|
||||||
fmt.Printf(" * read about installing addons: https://github.com/kubernetes/kops/blob/master/docs/addons.md\n")
|
fmt.Printf(" * read about installing addons: https://github.com/kubernetes/kops/blob/master/docs/addons.md\n")
|
||||||
fmt.Printf("\n")
|
fmt.Printf("\n")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -198,8 +198,7 @@ loadBalancer/api.{{ ClusterName }}:
|
||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
loadBalancerHealthChecks/api.{{ ClusterName }}:
|
loadBalancerHealthChecks/api.{{ ClusterName }}:
|
||||||
loadBalancer: loadBalancer/api.{{ ClusterName }}
|
loadBalancer: loadBalancer/api.{{ ClusterName }}
|
||||||
# 10249 Is the default kube-proxy healthz protocol
|
target: TCP:443
|
||||||
target: HTTP:10249/healthz
|
|
||||||
healthyThreshold: 2
|
healthyThreshold: 2
|
||||||
unhealthyThreshold: 2
|
unhealthyThreshold: 2
|
||||||
interval: 10
|
interval: 10
|
||||||
|
|
@ -208,8 +207,8 @@ securityGroupRule/kube-proxy-api-elb:
|
||||||
securityGroup: securityGroup/masters.{{ ClusterName }}
|
securityGroup: securityGroup/masters.{{ ClusterName }}
|
||||||
sourceGroup: securityGroup/api-elb.{{ ClusterName }}
|
sourceGroup: securityGroup/api-elb.{{ ClusterName }}
|
||||||
protocol: tcp
|
protocol: tcp
|
||||||
fromPort: 10249
|
fromPort: 443
|
||||||
toPort: 10249
|
toPort: 443
|
||||||
|
|
||||||
|
|
||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
|
|
@ -246,3 +245,14 @@ securityGroupRule/https-api-elb:
|
||||||
fromPort: 443
|
fromPort: 443
|
||||||
toPort: 443
|
toPort: 443
|
||||||
|
|
||||||
|
# ---------------------------------------------------------------
|
||||||
|
# DNS - Api
|
||||||
|
#
|
||||||
|
# This will point our DNS to the load balancer, and put the pieces
|
||||||
|
# together for kubectl to be work
|
||||||
|
# ---------------------------------------------------------------
|
||||||
|
dnsZone/{{ .DNSZone }}: {}
|
||||||
|
dnsName/{{ .MasterPublicName }}:
|
||||||
|
Zone: dnsZone/{{ .DNSZone }}
|
||||||
|
ResourceType: "A"
|
||||||
|
TargetLoadBalancer: loadBalancer/api.{{ ClusterName }}
|
||||||
Loading…
Reference in New Issue