Commit Graph

2421 Commits (750881c0ab62a9f59d53582bc33826caa167aa83)

Author SHA1 Message Date
SataQiu 7edea2b77f kubeadm cleanup: master -> control-plane 2019-02-13 23:13:31 +08:00
Yago Nobre 277dfbbdeb Add --kubeconfig-dir to validate mixed arguments whitelist, and refactor ValidateMixedArguments 2019-02-13 04:06:26 -02:00
SataQiu a957c83181 fix golint failures on cmd/kubeadm/app 2019-02-13 12:02:28 +08:00
Kubernetes Prow Robot 2981fb7a01
Merge pull request #73950 from SataQiu/cleanup-kubeadm-20190212
kubeadm cleanup: master -> control-plane
2019-02-12 12:40:11 -08:00
Kubernetes Prow Robot 51f5164f89
Merge pull request #73945 from neolit123/kubeadm-tests-non-linux
kubeadm: remove nodefs.inodesFree test defaulting on non-Linux
2019-02-12 12:40:01 -08:00
Ramya Shenoy 26392c0acd Move all constants to a single `const (`
[#1400]
2019-02-12 09:52:11 -08:00
Rafael Fernández López 30dc43ff86
kubeadm: set priority class name to `system-cluster-critical` for all master components
Remove the deprecated `scheduler.alpha.kubernetes.io/critical-pod` pod annotation and use
the `priorityClassName` first class attribute instead, setting all master components to
`system-cluster-critical`.
2019-02-12 17:50:36 +01:00
Lubomir I. Ivanov 19e89c32f5 kubeadm: remove nodefs.inodesFree test defaulting on non-Linux
Add test files that exclude the field in question
under KubeletConfiguration -> evictionHard for non-Linux.

Add runtime abstraction for the test files in initconfiguration_tests.go
2019-02-12 14:19:47 +02:00
SataQiu ab9709ff70 kubeadm cleanup: master -> control-plane 2019-02-12 17:31:35 +08:00
Rostislav M. Georgiev 0dfc1d6ded kubeadm: Don't dump backtrace on reset
The current code logs an error and full blown backtrace if we fail to remove
the containers upon reset. This creates unneeded, huge and rather scary log
message. Fix that by leaving just the error message.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2019-02-12 11:24:11 +02:00
Kubernetes Prow Robot aa00afe231
Merge pull request #73649 from ojmhetar/coredns-priorityclass
Add priority class to CoreDNS pods
2019-02-11 22:55:45 -08:00
Rostislav M. Georgiev 51197e4393 kubeadm: Refactor InitConfiguration init APIs
Currently ConfigFileAndDefaultsToInternalConfig and
FetchConfigFromFileOrCluster are used to default and load InitConfiguration
from file or cluster. These two APIs do a couple of completely separate things
depending on how they were invoked. In the case of

ConfigFileAndDefaultsToInternalConfig, an InitConfiguration could be either
defaulted with external override parameters, or loaded from file.
With FetchConfigFromFileOrCluster an InitConfiguration is either loaded from
file or from the config map in the cluster.

The two share both some functionality, but not enough code. They are also quite
difficult to use and sometimes even error prone.

To solve the issues, the following steps were taken:

- Introduce DefaultedInitConfiguration which returns defaulted version agnostic
  InitConfiguration. The function takes InitConfiguration for overriding the
  defaults.

- Introduce LoadInitConfigurationFromFile, which loads, converts, validates and
  defaults an InitConfiguration from file.

- Introduce FetchInitConfigurationFromCluster that fetches InitConfiguration
  from the config map.

- Reduce, when possible, the usage of ConfigFileAndDefaultsToInternalConfig by
  replacing it with DefaultedInitConfiguration or LoadInitConfigurationFromFile
  invocations.

- Replace all usages of FetchConfigFromFileOrCluster with calls to
  LoadInitConfigurationFromFile or FetchInitConfigurationFromCluster.

- Delete FetchConfigFromFileOrCluster as it's no longer used.

- Rename ConfigFileAndDefaultsToInternalConfig to
  LoadOrDefaultInitConfiguration in order to better describe what the function
  is actually doing.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2019-02-11 14:45:34 +02:00
Lubomir I. Ivanov 3b3b79fe2c autogenerated bazel 2019-02-08 19:31:22 +02:00
Lubomir I. Ivanov 1d032c40d3 kubeadm: add a preflight check for Docker and cgroup driver
systemd is the recommended driver as per the setup of running
the kubelet using systemd as the init system. Add a preflight
check that throws a warning if this isn't the case.
2019-02-08 19:31:22 +02:00
Kubernetes Prow Robot 395e4c05ba
Merge pull request #73745 from rosti/refactor-JoinConfigFileAndDefaultsToInternalConfig
kubeadm: refactor JoinConfigFileAndDefaultsToInternalConfig
2019-02-08 06:54:16 -08:00
Rostislav M. Georgiev 09f753a94c kubeadm: refactor JoinConfigFileAndDefaultsToInternalConfig
Currently JoinConfigFileAndDefaultsToInternalConfig is doing a couple of
different things depending on its parameters. It:

- loads a versioned JoinConfiguration from an YAML file.
- returns defaulted JoinConfiguration allowing for some overrides.

In order to make code more manageable, the following steps are taken:

- Introduce LoadJoinConfigurationFromFile, which loads a versioned
  JoinConfiguration from an YAML file, defaults it (both dynamically and
  statically), converts it to internal JoinConfiguration and validates it.

- Introduce DefaultedJoinConfiguration, which returns defaulted (both
  dynamically and statically) and verified internal JoinConfiguration.
  The possibility of overwriting defaults via versioned JoinConfiguration is
  retained.

- Re-implement JoinConfigFileAndDefaultsToInternalConfig to use
  LoadJoinConfigurationFromFile and DefaultedJoinConfiguration.

- Replace some calls to JoinConfigFileAndDefaultsToInternalConfig with calls to
  either LoadJoinConfigurationFromFile or DefaultedJoinConfiguration where
  appropriate.

- Rename JoinConfigFileAndDefaultsToInternalConfig to the more appropriate name
  LoadOrDefaultJoinConfiguration.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2019-02-08 14:00:02 +02:00
Dmitry Rozhkov 6ac76f9859 kubeadm: restructure upgradeVariables 2019-02-08 11:45:33 +02:00
Kubernetes Prow Robot eac19a3ab9
Merge pull request #73616 from dims/move-part-of-kubelet-apis-well-known-lables
move pkg/kubelet/apis/well_known_labels.go to staging/src/k8s.io/api/core/v1/
2019-02-07 19:44:34 -08:00
Kubernetes Prow Robot 7d1dc61920
Merge pull request #73678 from ereslibre/do-not-create-etcd-datadir-dryrun
kubeadm: do not create etcd datastore if we are in dryrun mode
2019-02-07 15:49:53 -08:00
Kubernetes Prow Robot 5b6a23f3af
Merge pull request #73798 from MalloZup/remove-wrong-string
kubeadm: improve ux on infoMsg kubeconfig
2019-02-07 10:20:34 -08:00
Ojas M ebb5b9436f Add priorityClassName to kubeadm kubedns manifest 2019-02-07 09:21:05 -08:00
Ojas M b41bafac7c Add priorityClassName to kubeadm coredns manifest 2019-02-06 15:23:37 -08:00
dmaiocchi 83b808b3b0 kubeadm: improve ux on infoMsg kubeconfig 2019-02-06 23:27:12 +01:00
Rafael Fernández López 981bf1930c
kubeadm: do not create etcd datastore if we are in dryrun mode
This allows for kubeadm tests to pass when run with an unprivileged
user.
2019-02-06 22:59:19 +01:00
Yago Nobre e7a8ac1099
kubeadm: graduate kubelet start join phase 2019-02-06 01:35:28 -02:00
ksubrmnn 164f79e2d4 Update config tests 2019-02-05 10:39:23 -08:00
Davanum Srinivas b975573385
move pkg/kubelet/apis/well_known_labels.go to staging/src/k8s.io/api/core/v1/
Co-Authored-By: Weibin Lin <linweibin1@huawei.com>

Change-Id: I163b2f2833e6b8767f72e2c815dcacd0f4e504ea
2019-02-05 13:39:07 -05:00
Kubernetes Prow Robot 667584cec0
Merge pull request #73728 from neolit123/kubeadm-remove-experimental-config
kubeadm: remove warning about config usage
2019-02-05 06:47:39 -08:00
Kubernetes Prow Robot 28fefba116
Merge pull request #73725 from fabriziopandini/kubeadm-organize-phases
kubeadm: organize phases cmd
2019-02-05 03:18:42 -08:00
Lubomir I. Ivanov b9816b1231 kubeadm: remove warning about config usage 2019-02-05 03:06:25 +02:00
fabriziopandini 64a7c0c7a5 autogenerated 2019-02-05 00:36:24 +01:00
fabriziopandini f38217c75b kubeadm-organize-phases 2019-02-05 00:36:12 +01:00
fabriziopandini 7333cc79d6 remove-kubeadm-alpha-preflight 2019-02-04 21:57:55 +01:00
Rafael Fernández López 031ce12dbd
kubeadm: graduate control plane prepare phase 2019-02-04 09:58:06 +01:00
Kubernetes Prow Robot 0c2613c71a
Merge pull request #73474 from rosti/IsSupportedVersion
kubeadm: Introduce ValidateSupportedVersion
2019-02-02 01:59:37 -08:00
Rostislav M. Georgiev e10dcf07d7 kubeadm: Introduce ValidateSupportedVersion in place of DetectUnsupportedVersion
DetectUnsupportedVersion is somewhat uncomfortable, complex and inefficient
function to use. It takes an entire YAML document as bytes, splits it up to
byte slices of the different YAML sub-documents and group-version-kinds and
searches through those to detect an unsupported kubeadm config. If such config
is detected, the function returns an error, if it is not (i.e. the normal
function operation) everything done so far is discarded.

This could have been acceptable, if not the fact, that in all cases that this
function is called, the YAML document bytes are split up and an iteration on
GVK map is performed yet again. Hence, we don't need DetectUnsupportedVersion
in its current form as it's inefficient, complex and takes only YAML document
bytes.

This change replaces DetectUnsupportedVersion with ValidateSupportedVersion,
which takes a GroupVersion argument and checks if it is on the list of
unsupported config versions. In that case an error is returned.
ValidateSupportedVersion relies on the caller to read and split the YAML
document and then iterate on its GVK map checking if the particular
GroupVersion is supported or not.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2019-02-01 19:35:39 +02:00
Kubernetes Prow Robot b5b627d522
Merge pull request #73636 from bart0sh/PR0059-kubeadm-reset-fix-null-pointer-dereference
kubeadm: fix nil pointer dereference
2019-02-01 09:03:56 -08:00
Kubernetes Prow Robot 5dd46ad911
Merge pull request #73406 from MalloZup/02-refactor
Limit scope and refactor config functions
2019-02-01 07:44:37 -08:00
Ed Bartosh ab655a29b8 kubeadm: fix nil pointer dereference
If configuration file doesn't exist client variable is not assigned
and causes kubeadm crash:

$ sudo ./_output/bin/kubeadm reset
[reset] Reading configuration from the cluster...
[reset] FYI: You can look at this config file with 'kubectl -n kube-system get cm kubeadm-config -oyaml'
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0xf8 pc=0x108c9e7]

goroutine 1 [running]:
cmd/kubeadm/app/util/config.getInitConfigurationFromCluster(0x171109b, 0xf, 0x0, 0x0, 0xc0005b5a00, 0x3, 0x3, 0x69)
	cmd/kubeadm/app/util/config/cluster.go:93 +0x37
cmd/kubeadm/app/util/config.loadConfiguration(0x0, 0x0, 0x18d63a0, 0xc00000c018, 0x170620b, 0x5, 0x0, 0x0, 0x15d6000, 0x18d7601, ...)
	cmd/kubeadm/app/util/config/cluster.go:67 +0x374
k8s.io/kubernetes/cmd/kubeadm/app/util/config.FetchConfigFromFileOrCluster(0x0, 0x0, 0x18d63a0, 0xc00000c018, 0x170620b, 0x5, 0x0, 0x0, 0x497700, 0x18d63e0, ...)
	cmd/kubeadm/app/util/config/cluster.go:45 +0x9c
k8s.io/kubernetes/cmd/kubeadm/app/cmd.resetDetectCRISocket(0x0, 0x0, 0x1, 0x0, 0x18d63e0, 0xc0003f0630)
	cmd/kubeadm/app/cmd/reset.go:304 +0x73
k8s.io/kubernetes/cmd/kubeadm/app/cmd.NewCmdReset.func1(0xc0002a6780, 0x26dd548, 0x0, 0x0)
	cmd/kubeadm/app/cmd/reset.go:71 +0x267
k8s.io/kubernetes/vendor/github.com/spf13/cobra.(*Command).execute(0xc0002a6780, 0x26dd548, 0x0, 0x0, 0xc0002a6780, 0x26dd548)
	vendor/github.com/spf13/cobra/command.go:760 +0x2cc
k8s.io/kubernetes/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc00019a000, 0xc000389180, 0xc00019a500, 0xc00057c1a0)
	vendor/github.com/spf13/cobra/command.go:846 +0x2fd
k8s.io/kubernetes/vendor/github.com/spf13/cobra.(*Command).Execute(0xc00019a000, 0xc00000c010, 0x18d63a0)
	vendor/github.com/spf13/cobra/command.go:794 +0x2b
k8s.io/kubernetes/cmd/kubeadm/app.Run(0xc000086180, 0x18b)
	cmd/kubeadm/app/kubeadm.go:48 +0x202
main.main()
	cmd/kubeadm/kubeadm.go:29 +0x33

Removing check for configuration file existence should fix the issue.
2019-02-01 15:36:43 +02:00
Sandeep Rajan aa11f6c298 Bump CoreDNS version to 1.3.1 2019-01-31 16:55:02 -05:00
dmaiocchi fd708d173e refactor config functions 2019-01-31 16:48:18 +01:00
Kubernetes Prow Robot 92076f0d2e
Merge pull request #73501 from dlipovetsky/fix-kubelet-exec-error
kubeadm: Make exec error message more informative
2019-01-30 20:26:03 -08:00
Kubernetes Prow Robot 0f93328c7a
Merge pull request #73457 from xichengliudui/updatedockerversion
Update docker support for k8s
2019-01-30 16:39:01 -08:00
dmaiocchi 71494aa9ce add preflight-phase 2019-01-30 20:43:45 +01:00
xichengliudui 945889988b Update docker support for k8s
update pull request

update pull request

update pull request

update pull request
2019-01-30 03:25:05 -05:00
Kubernetes Prow Robot d57d606275
Merge pull request #73495 from neolit123/phase-control-plane
kubeadm: fix missing 'all' in 'init phase control-plane'
2019-01-29 16:50:46 -08:00
Daniel Lipovetsky 4fe0d2107d kubeadm: Make exec error message more informative 2019-01-29 16:38:35 -08:00
Kubernetes Prow Robot bb9a12d6f8
Merge pull request #73487 from ereslibre/phases-cleanup
kubeadm: cleanup of phases arguments
2019-01-29 15:34:30 -08:00
Lubomir I. Ivanov 52e62a73d8 kubeadm: fix missing 'all' in 'init phase control-plane' 2019-01-30 00:24:48 +02:00
Kubernetes Prow Robot b8b689aae0
Merge pull request #72111 from rosti/reduce-initcfg
kubeadm: Reduce the usage of InitConfiguration
2019-01-29 14:01:07 -08:00
Rafael Fernández López 1bd15658f8
kubeadm: cleanup of phases arguments
* Return `nil` instead of a pointer to an empty struct when possible,
  before the pointer was introduced the empty struct was required.

* Explicitly accept only one argument maximum for `kubeadm join` as in
  `kubeadm join <master>`.

* Accept no arguments for `kubeadm init`.

* Make phases leafs accept arguments, whereas intermediate phases
  automatically gets set that they accept no arguments.
2019-01-29 22:11:59 +01:00
Kubernetes Prow Robot c501d464af
Merge pull request #73267 from rajansandeep/proxytoforward
Use forward plugin instead of proxy plugin in the default configuration of CoreDNS
2019-01-29 11:32:28 -08:00
Kubernetes Prow Robot 5262dba064
Merge pull request #73198 from mourya007/library
Re-Organize the pkutil library
2019-01-29 01:20:42 -08:00
Rostislav M. Georgiev 80e2a3cf07 kubeadm: reduce the usage of InitConfiguration
For historical reasons InitConfiguration is used almost everywhere in kubeadm
as a carrier of various configuration components such as ClusterConfiguration,
local API server endpoint, node registration settings, etc.

Since v1alpha2, InitConfiguration is meant to be used solely as a way to supply
the kubeadm init configuration from a config file. Its usage outside of this
context is caused by technical dept, it's clunky and requires hacks to fetch a
working InitConfiguration from the cluster (as it's not stored in the config
map in its entirety).

This change is a small step towards removing all unnecessary usages of
InitConfiguration. It reduces its usage by replacing it in some places with
some of the following:

- ClusterConfiguration only.
- APIEndpoint (as local API server endpoint).
- NodeRegistrationOptions only.
- Some combinations of the above types, or if single fields from them are used,
  only those field.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2019-01-28 12:21:01 +02:00
Lubomir I. Ivanov 1b0ba920fe kubeadm: fix a couple of problems related to initData/joinData
Fix a couple of problems related to data used by the phases runners
of `init` and `join`.

1) make `newInitData()` and `newJoinData()` return pointers.

Methods of the data objects returned by these functions should
be able to modify fields in the data objects - e.g.
`func (d initData) Client()`. This allows us to store a state and
not execute the same logic multiple times - e.g. obtaining a client.

A side effect of this change is that the `new...` functions must return
pointers, so that casting the data object in a phase, from
`workflow.RunData` to a locally defined interface, works.

2) Make it possible to pass arguments from a parent command
to a sub-phase with regards to data initialization.
2019-01-26 18:41:19 +02:00
mourya007 7c37e91a6d Re-Organize the pkutil library 2019-01-26 14:56:36 +05:30
Kubernetes Prow Robot a5e424dc17
Merge pull request #72923 from saschagrunert/dedent-update
Update dedent to latest release
2019-01-25 18:32:23 -08:00
Kubernetes Prow Robot 5673506540
Merge pull request #73320 from liggitt/initializer-cleanup
Clean up initializer-related comments, test data
2019-01-25 15:28:18 -08:00
Kubernetes Prow Robot d54716338a
Merge pull request #73302 from rajansandeep/prometheusport
Add metrics port to CoreDNS service
2019-01-25 12:04:37 -08:00
Kubernetes Prow Robot c6a6c65e32
Merge pull request #73316 from rosti/fix-kubeadm-reset
kubeadm: Fix auto CRI detection in kubeadm reset
2019-01-25 10:05:22 -08:00
Jordan Liggitt 89b0b0b84b Clean up initializer-related comments, test data 2019-01-25 12:37:45 -05:00
Kubernetes Prow Robot ce52bf1265
Merge pull request #73093 from ereslibre/verify-certificate-sans
kubeadm: verify that present certificates contain at least the required SANs
2019-01-25 08:53:08 -08:00
Rostislav M. Georgiev 873accd513 kubeadm: Fix auto CRI detection in kubeadm reset
Reversed if statement is turns off CRI detection in kubeadm reset. Trivial fix.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2019-01-25 17:04:43 +02:00
Sandeep Rajan e9220dd408 add prometheus port 2019-01-25 11:29:03 +05:30
Kubernetes Prow Robot 20a11ac5cc
Merge pull request #73239 from mattkelly/bugfix/kubeadm-sa-cert-dir
Add back --cert-dir option for kubeadm init phase certs sa
2019-01-24 08:45:36 -08:00
Sandeep Rajan c346ae1e49 Use forward plugin instead of proxy in the default configuration 2019-01-24 17:28:55 +05:30
Matt Kelly 35faaab570
Add back --cert-dir option for init phase certs sa 2019-01-23 19:37:08 -05:00
Akihito INOH 4a3b990bbe Change to [bootstrap-token] in kubeadm output
In output of "kubeadm init", there are two strings for meaning of
bootstrap token which are "bootstraptoken" and "bootstrap-token".
This changes `[bootstraptoken]` to `[bootstrap-token]`.
2019-01-24 08:40:58 +09:00
Kubernetes Prow Robot baaaa15fdf
Merge pull request #69940 from MarcPow/master
Bind coredns containers to  linux nodes to avoid Windows scheduling
2019-01-23 12:19:53 -08:00
Kubernetes Prow Robot b66e332d3c
Merge pull request #69366 from rosti/cri-auto-detect
kubeadm: Detect CRIs automatically
2019-01-23 09:49:17 -08:00
RA489 5b64a98689 Stop using API server's `--insecure-port` 2019-01-22 17:31:39 +05:30
Rostislav M. Georgiev f97770b175 kubeadm: Detect CRIs automatically
In order to allow for a smoother UX with CRIs different than Docker, we have to
make the --cri-socket command line flag optional when just one CRI is
installed.

This change does that by doing the following:

- Introduce a new runtime function (DetectCRISocket) that will attempt to
  detect a CRI socket, or return an appropriate error.
- Default to using the above function if --cri-socket is not specified and
  CRISocket in NodeRegistrationOptions is empty.
- Stop static defaulting to DefaultCRISocket. And rename it to
  DefaultDockerCRISocket. Its use is now narrowed to "Docker or not"
  distinguishment and tests.
- Introduce AddCRISocketFlag function that adds --cri-socket flag to a flagSet.
  Use that in all commands, that support --cri-socket.
- Remove the deprecated --cri-socket-path flag from kubeadm config images pull
  and deprecate --cri-socket in kubeadm upgrade apply.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2019-01-21 16:12:04 +02:00
Kubernetes Prow Robot 3ec18a5aed
Merge pull request #73029 from neolit123/join-phases
kubeadm: include a phase runner for `join`
2019-01-20 10:53:47 -08:00
Kubernetes Prow Robot 3fd7187b4c
Merge pull request #73059 from SataQiu/fix-20190118
Print more error details about CertSANs validation
2019-01-20 08:21:10 -08:00
Lubomir I. Ivanov 9744d40f37 kubeadm: include a phase runner for `join`
- add a phase runner
- expose more joinData fields and getter methods
- add TODOs
2019-01-20 16:31:13 +02:00
Rafael Fernández López 6dc6ce78d9
kubeadm: adapt timeout for new etcd member to join 2019-01-20 12:39:53 +01:00
Kubernetes Prow Robot f2b133d7b4
Merge pull request #72984 from ereslibre/wait-for-etcd-when-growing
kubeadm: wait for the etcd cluster to be available when growing it
2019-01-19 23:57:46 -08:00
SataQiu 7bf6ff2ec1 print more error details about CertSANs validation 2019-01-20 08:42:09 +08:00
Rafael Fernández López f22f594d34
kubeadm: verify that present certificates contain at least the required SANs
This avoids ending in a wrong cluster state by assuming that the
present certificates will work. It is specially important when we
are growing etcd from 1 member to 2, in which case in case of failure
upon joining etcd will be unavailable.
2019-01-19 16:00:19 +01:00
Rafael Fernández López b4cb3fd37c
kubeadm: wait for the etcd cluster to be available when growing it
When the etcd cluster grows we need to explicitly wait for it to be
available. This ensures that we are not implicitly doing this in
following steps when they try to access the apiserver.
2019-01-18 12:04:39 +01:00
Sascha Grunert ba7aaa911d
Update dedent to latest release
Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2019-01-17 08:30:07 +01:00
Kubernetes Prow Robot 6d479af411
Merge pull request #72870 from MalloZup/fix-join-ha
Kubeadm/HA: pull images during join for control-plane
2019-01-16 04:03:20 -08:00
Kubernetes Prow Robot 69cb938a6a
Merge pull request #72909 from MalloZup/minor-print
Kubeadm: Use fmt.Println instead of fmt.Printf
2019-01-15 12:53:43 -08:00
Kubernetes Prow Robot 9c48ca4899
Merge pull request #72823 from dims/bump-version-of-docker-to-18.09
Bump Docker supported version to 18.09
2019-01-15 11:45:06 -08:00
dmaiocchi 86b6bbd1b9 Pre-pull images after preflight for HA setup.
If download fails continue with a warning only
2019-01-15 16:49:31 +01:00
dmaiocchi a7225bc15c Kubeadm: Use fmt.Println instead of fmt.Printf 2019-01-15 09:22:24 +01:00
Dmitry Rozhkov 8c87ef51b8 kubeadm: reduce variables scope and hide private funcs
This is a minor cleanup which helps to make the code of kubeadm a bit
less error-prone by reducing the scope of local variables and
unexporting functions that are not meant to be used outside of their
respective modules.
2019-01-14 15:29:42 +02:00
Davanum Srinivas 62fc6df5c2
Bump Docker supported version to 18.09
For 1.14, let's switch to latest Docker 18.09

Change-Id: Ib8d4d9dd3cb51cf4780623389a4bcb101d3c8fa7
2019-01-13 21:41:33 -05:00
Kubernetes Prow Robot ef70b1159d
Merge pull request #72442 from fabriziopandini/join-refactor
Refactor the kubeadm join command
2019-01-12 08:06:25 -08:00
Kubernetes Prow Robot 23315c8192
Merge pull request #72802 from foxyriver/dedent
format help text
2019-01-11 23:14:59 -08:00
Kubernetes Prow Robot e44330dfab
Merge pull request #72455 from rojkov/test-e2e-node-gke
e2e-node-tests: fix path to system specs
2019-01-11 03:30:37 -08:00
foxyriver b02e1e17ec format help text 2019-01-11 10:18:56 +08:00
Dmitry Rozhkov 43fce8d6e4 e2e-node-tests: fix path to system specs
e2e-node tests may use custom system specs for validating nodes to
conform the specs. The functionality is switched on when the tests
are run with this command:

    make SYSTEM_SPEC_NAME=gke test-e2e-node

Currently the command fails with the error:

    F1228 16:12:41.568836   34514 e2e_node_suite_test.go:106] Failed to load system spec: open /home/rojkov/go/src/k8s.io/kubernetes/k8s.io/kubernetes/cmd/kubeadm/app/util/system/specs/gke.yaml: no such file or directory

Move the spec file under `test/e2e_node/system/specs` and introduce a single
public constant referring the file to use instead of multiple private constants.
2019-01-10 10:37:55 +02:00
Ed Bartosh d91861e883 kubeadm: add front-proxy CA certificate to selfhosting controller-manager
Selfhosting pivoting fails when using --store-certs-in-secrets
as controller-manager fails to start because of missing front-proxy CA
certificate:
    unable to load client CA file: unable to load client CA file: open
    /etc/kubernetes/pki/front-proxy-ca.crt: no such file or directory

Added required certificate to fix this.

This should fix kubernetes/kubeadm#1281
2019-01-09 17:01:18 +02:00
fabriziopandini fd842480d1 Refactor the kubeadm join command 2019-01-09 12:46:53 +01:00
Ed Bartosh 8148d95ac9 kubeadm selfhosting: fix pod spec mutation for controller-manager
Modified command line options --authentication-kubeconfig and
--authorization-kubeconfig to point out to the correct location
of the controller-manager.conf

This should fix this controller-manager crash:
    failed to get delegated authentication kubeconfig: failed to get
    delegated authentication kubeconfig: stat
    /etc/kubernetes/controller-manager.conf: no such file or directory

Related issue: kubernetes/kubeadm#1281
2019-01-07 15:20:02 +02:00
Kubernetes Prow Robot fdf381098b
Merge pull request #72622 from shavidissa/patch-1
Updated the term master to control plane
2019-01-07 04:55:48 -08:00
Kubernetes Prow Robot b06462f040
Merge pull request #72513 from fabriziopandini/init-unit-test
Add kubeadm init unit test
2019-01-07 03:46:33 -08:00
shavidissa 2a6c5b9b9e
Updated the term master to control plane 2019-01-07 11:26:31 +05:30
Kubernetes Prow Robot 816dfab180
Merge pull request #72572 from fabriziopandini/cleanup-getControllerManagerCommand
kubeadm: cleanup getControllerManagerCommand
2019-01-04 09:02:35 -08:00
fabriziopandini ada466dc67 cleanup-getControllerManagerCommand 2019-01-04 14:08:04 +01:00
Kubernetes Prow Robot d8eba8817b
Merge pull request #72528 from bart0sh/PR0056-kubeadm-selfhosting-upgrade-use-t.Run
kubeadm: use t.Run in selfhosting and update phases
2019-01-04 04:11:33 -08:00
Kubernetes Prow Robot 8a60166fba
Merge pull request #72512 from AdamDang/patch-20
Typo fix in error message: kubadm->kubeadm
2019-01-03 21:58:57 -08:00
Ed Bartosh 442098bdec kubeadm: use t.Run in selfhosting and update phases
Used T.Run API for kubeadm tests in app/phases/selfhosting and
app/phases/update directories

This should improve testing output and make it more visible
which test is doing what.
2019-01-03 19:23:54 +02:00
Kubernetes Prow Robot 8252610f91
Merge pull request #72514 from fabriziopandini/cleanup-etcd-client
kubeadm: cleanup etcd client
2019-01-03 06:58:30 -08:00
fabriziopandini c9302caf6c error-imports-cleanups 2019-01-03 13:25:18 +01:00
fabriziopandini 3fa36acaa7 autogenerated 2019-01-03 13:00:47 +01:00
fabriziopandini 684b80f8b8 cleanup kubeadm etcd client 2019-01-03 12:21:17 +01:00
fabriziopandini 699983645d add kubeadm init unit tests 2019-01-03 12:04:30 +01:00
AdamDang 8c13df8b6a
Typo fix in error message: kubadm->kubeadm
Typo fix: kubadm->kubeadm
2019-01-03 18:32:10 +08:00
Kubernetes Prow Robot 60561cddf1
Merge pull request #72484 from AdamDang/patch-19
Typo fix: control plan->control plane
2019-01-03 02:11:51 -08:00
Kubernetes Prow Robot 98b3e42127
Merge pull request #72483 from bart0sh/PR0055-kubeadm-rest-app-use-T.Run
kubeadm: use T.Run API in app/
2019-01-02 21:10:57 -08:00
Kubernetes Prow Robot a7cb03f4cf
Merge pull request #72463 from wnxn/kubeadm-typo
Fix typo cgroupDriver -> cgroup-driver
2019-01-02 10:11:51 -08:00
Kubernetes Prow Robot da59a6da4a
Merge pull request #72478 from bart0sh/PR0054-kubeadm-selfhosting-pivot-kube-apiserver
kubeadm: add required etcd certs to selfhosting api-server
2019-01-02 07:43:30 -08:00
Ed Bartosh 215db4d46b kubeadm: use T.Run API in app/
Used T.Run API for kubeadm tests in app/

This should improve testing output and make it more visible
which test is doing what.
2019-01-02 17:14:02 +02:00
AdamDang 05e31068da
Typo fix: control plan->control plane
Typo fix: control plan->control plane
2019-01-02 22:10:57 +08:00
Ed Bartosh 7b058c4357 kubeadm: add required etcd certs to selfhosting api-server
Selfhosting pivoting fails when using --store-certs-in-secrets
as api-server fails to start because of missing etcd/ca and
apiserver-etcd-client certificates:
   F1227 16:01:52.237352 1 storage_decorator.go:57] Unable to create storage backend:
   config (&{ /registry [https://127.0.0.1:2379]
              /etc/kubernetes/pki/apiserver-etcd-client.key
              /etc/kubernetes/pki/apiserver-etcd-client.crt
              /etc/kubernetes/pki/etcd/ca.crt true 0xc000884120 <nil> 5m0s 1m0s}),
   err (open /etc/kubernetes/pki/apiserver-etcd-client.crt: no such file or directory)

Added required certificates to fix this.

Secret name for etc/ca certifcate has been converted to conform RFC-1123 subdomain
naming conventions to prevent this TLS secret creation failure:
    unable to create secret: Secret "etcd/ca" is invalid: metadata.name:
    Invalid value: "etcd/ca": a DNS-1123 subdomain must consist of lower
    case alphanumeric characters, '-' or '.', and must start and end with an
    alphanumeric character (e.g. 'example.com', regex used for validation is
    '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')

Related issue: kubernetes/kubeadm#1281
2019-01-02 13:40:04 +02:00
Alan c28cf37c1f
fix typo: if -> it
fix typo: if -> it
2019-01-02 17:07:13 +08:00
Kubernetes Prow Robot 02e6c18c56
Merge pull request #72443 from Zyqsempai/refactor-token-flag-names-into-const
Moved token related flags to constants.
2019-01-01 10:31:21 -08:00
Kubernetes Prow Robot 993c65634e
Merge pull request #71973 from MalloZup/fix-1234
Exclude by default address flag fix #1234
2019-01-01 05:36:18 -08:00
Xin Wang d50338c1ed Fix typo cgroupDriver -> cgroup-driver
Signed-off-by: Xin Wang <wileywang@yunify.com>
2019-01-01 19:46:18 +08:00
Boris b9898eb2ad Token related flags refactored into constants.
Moved token related flags to constants.

Token related flags refactored into constants.

Moved token related flags to constants.

Used new Consts flags in api's validation

Build deps fix

Moved token related flags to constants.

Used new Consts flags in api's validation

Build deps fix

Lint fix

Lint BUILD
2019-01-01 03:46:19 +02:00
Ed Bartosh 645c1fa1ab kubeadm: use T.Run API in app/cmd
Used T.Run API for kubeadm tests in app/cmd

This should improve testing output and make it more visible
which test is doing what.
2018-12-31 14:29:52 +02:00
Ed Bartosh d57ec59867 kubeadm: use T.Run API in app/apis/kubeadm
Used T.Run API for kubeadm tests in app/apis/kubeadm

This should improve testing output and make it more visible
which test is doing what.
2018-12-31 00:08:27 +02:00
Kubernetes Prow Robot 13e59ab9ad
Merge pull request #72433 from bart0sh/PR0050-kubeadm-app-util-use-T.Run
kubeadm: use T.Run API in app/util
2018-12-30 03:45:41 -08:00
Ed Bartosh 01c9e67c90 kubeadm: fix incorrect package name in idempotency_test.go 2018-12-29 18:30:30 +02:00
Ed Bartosh 47b4d8fc81 kubeadm: use T.Run API in app/util
Used T.Run API for kubeadm tests in app/util/
2018-12-29 18:27:38 +02:00
Kubernetes Prow Robot 7d8554643e
Merge pull request #72367 from rojkov/fix-golint-warnings
kubeadm: fix golint warnings for redundant ifs
2018-12-28 12:03:15 -08:00
Kubernetes Prow Robot b89ab2c0c3
Merge pull request #72299 from bart0sh/PR0046-kubeadm-add-CurrentKubernetesVersion
kubeadm: add CurrentKubernetesVersion
2018-12-28 12:03:05 -08:00
Kubernetes Prow Robot 2cc92a09fd
Merge pull request #72399 from bart0sh/PR0049-kubeadm-app-util-system-fix-golint-warnings
kubeadm: fix golint warnings in package_validator
2018-12-28 09:44:31 -08:00
Ed Bartosh 60fc0bf75b kubeadm: fix golint warnings in package_validator
Fixed the following golint warnigns:
 - package_validator.go:68:1: receiver name should not be an underscore, omit the name if it is unused
 - package_validator.go:89:1: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self"
 - package_validator.go:96:1: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self"
 - package_validator.go:119:1: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self"
2018-12-28 13:38:10 +02:00
Ed Bartosh e6c3ab013c kubeadm: use T.Run API in app/util/system
Used T.Run API for kubeadm tests in app/util/system
2018-12-28 13:09:07 +02:00
Dmitry Rozhkov 0bf0b3ef1a kubeadm: fix golint warnings for redundant ifs
When golint is run against kubeadm it reports severel warnings like

    redundant if ...; err != nil check, just return error instead.

Fix the warnings by just returning error.
2018-12-27 15:37:39 +02:00
Ed Bartosh e6937ec27f kubeadm: add CurrentKubernetesVersion
Replaced hardcoded "v0.13.0" strings with CurrentKubernetesVersion variable.

This should help with a regular release version bumps.
2018-12-27 11:29:59 +02:00
Kubernetes Prow Robot 197fc67693
Merge pull request #72215 from caesarxuchao/minor-test-fix
Fix the unit test patch to not modify the node name
2018-12-25 19:57:09 -08:00
Kubernetes Prow Robot 190f6d870e
Merge pull request #71946 from bart0sh/PR0045-kubeadm-1260-simplify-minimum-kubernetes-version-bumps
kubeadm: simplify minimum Kubernetes version bumps
2018-12-21 21:28:53 -08:00
dmaiocchi 6148992056 Replace address with bind-address 2018-12-20 22:14:16 +01:00
Kubernetes Prow Robot 4a21a774e9
Merge pull request #72059 from rojkov/kubeadm-check-remote-version-v2
kubeadm: refactor validateStableVersion()
2018-12-20 04:42:25 -08:00
Chao Xu 7223f0fd16 Fix the unit test patch to not modify the node name 2018-12-19 14:02:33 -08:00
Ed Bartosh b40018da7b kubeadm: simplify minimum Kubernetes version bumps
Replaced hardcoded "v0.12.0" strings with MinimumControlPlaneVersion and
MinimumKubeletVersion global variables.

This should help with a regular release version bumps.
2018-12-19 20:41:25 +02:00
Kubernetes Prow Robot 73b9effcb6
Merge pull request #72030 from ereslibre/fix-race-condition-on-node-join
Fix race condition when joining nodes
2018-12-18 03:02:40 -08:00
Anit Gandhi 60f754a8a3 kubeadm: fix nil check in join config creation 2018-12-17 13:57:37 -05:00
Dmitry Rozhkov b9c2139ccc kubeadm: refactor validateStableVersion()
Currently the function `cmd/kubeadm/app/util.validateStableVersion()`
doesn't validate remote versions in the special case when the client
version is empty. This makes the code more difficult to reason about,
because the function may successfully return a string which isn't a valid version.

Move handling the special case outside of the function to the place
where its meaning is more obvious.
2018-12-17 17:05:41 +02:00
Dmitry Rozhkov 4b6d91c2c3 kubeadm: print stack trace in case of unexpected error 2018-12-14 12:23:54 +02:00
Rafael Fernández López 6a8a832f61
Fix race condition when joining nodes
Despite we were checking for the kubelet kubeconfig file to be present, the
kubelet first writes this file and then the certificates the kubeconfig file
refers to. This represents a race condition in kubeadm in which when we confirm
that the kubelet's kubeconfig file is present we continue creating a clientset
out of it. However, the clientset creation will ensure that the certificates the
kubeconfig file refers to exist on the filesystem.

To fix this problem, not only wait for the kubelet's kubeconfig file to be
present, but also ensure that we can create a clientset ouf of it on our polling
process, while we wait for the kubelet to have performed the TLS bootstrap.
2018-12-13 20:51:35 +01:00
pytimer 48d757b6bb kubeadm: fixed etcd sync endpoints 2018-12-11 10:03:22 +08:00
Kubernetes Prow Robot 0b13221f68
Merge pull request #71885 from dims/create-etcd-with-0700-permissions
Create /var/lib/etcd with 0700
2018-12-10 14:08:33 -08:00
Kubernetes Prow Robot 486f407b1d
Merge pull request #71890 from odacremolbap/replace-proxy-with-kubelet-kubeadm-docs
replace proxy with kubelet at kubeadm v1beta1 docs
2018-12-10 05:39:49 -08:00
Kubernetes Prow Robot 21a8d08fab
Merge pull request #71258 from bart0sh/PR0042-kubeadm-1159-improve-hostport-error-messages
kubeadm: improve hostport parsing error messages
2018-12-09 23:59:06 -08:00
Pablo Mercado 996845d9d9 replace proxy with kubelet at kubeadm v1beta1 docs 2018-12-09 08:51:34 +01:00
Davanum Srinivas 836f413cf1
Create /var/lib/etcd with 0700
If we let the hostpath with DirectoryOrCreate to create this directory
it defaults to 0755. A default install should use 0700 for better
security especially if the directory is not present.

Change-Id: Idc0266685895767b0d1c5710c8a4fb704805652f
2018-12-08 19:42:58 -05:00
Kubernetes Prow Robot c06c08e5ae
Merge pull request #71828 from yuexiao-wang/cleanup-upgrad-etcd-left
kubeadm: fixed cleanup upgrade from no-TLS etcd to TLS etcd
2018-12-08 02:39:54 -08:00
yuexiao-wang 39f71245b3 kubeadm: fixed cleanup upgrade from no-TLS etcd to TLS etcd
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2018-12-08 08:38:03 +08:00
Rostislav M. Georgiev c3364cf48d kubeadm: remove unused func runCmdPhase
Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2018-12-07 13:30:32 +02:00
Yago Nobre 05e5a3473d
Use kubeconfig flag instead of kubeconfig-dir in kubeadm init phase bootstrap-token 2018-12-06 14:42:45 -02:00
yuexiao-wang 5610ac3c9c cleanup upgrade from non-TLS etcd to TLS etcd
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2018-12-05 23:10:13 +08:00
Kubernetes Prow Robot 0214031fcf
Merge pull request #71702 from yuexiao-wang/move-test
kubeadm: move test utilites out of /test
2018-12-04 20:06:54 -08:00
Kubernetes Prow Robot 7af52384ea
Merge pull request #71467 from rosti/nuke-config-print-defaults
kubeadm: remove kubeadm config print-defaults
2018-12-04 10:04:32 -08:00
yuexiao-wang 0dc0659e07 move test utilites out of /test
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2018-12-04 19:27:17 +08:00
Kubernetes Prow Robot b6c8ef298e
Merge pull request #71663 from bart0sh/PR0044-kubeadm-1294-fix-unmount-kubelet-dirs
kubeadm: properly umount dirs in /var/lib/kubelet
2018-12-04 02:54:44 -08:00
Joe Betz 862b945e5a Update default etcd server to 3.3.10 for kubernetes 1.13 2018-12-03 11:03:49 -08:00
Ed Bartosh 48a961cfa2 kubeadm: properly umount dirs in /var/lib/kubelet
'kubeadm reset' uses incorrect way of unmounting /var/lib/kubelet
directories. It queries /proc/mounts for /var/lib/kubelet mount point.
If /var/lib/kubelet directory is also mounted it makes 'kubelet reset'
to unmount it too, which is incorrect. It also makes it fail as it
can't unmount /var/lib/kubelet before unmounting mounts inside it.

Fixed by querying /var/lib/kubelet/ instead of /var/lib/kubelet.
This should exclude /var/lib/kubelet from the query results even if
it's mounted.

Fixes: kubernetes/kubeadm#1294
2018-12-03 18:45:52 +02:00
Rostislav M. Georgiev ffb670b8a8 kubeadm: remove kubeadm config print-defaults
Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2018-12-03 17:43:42 +02:00
k8s-ci-robot 67bca44801
Merge pull request #71465 from aanm/fix-kubeadm-documentation
apis/kubeadm/v1beta1: fix typo in localApiEndpoint -> localAPIEndpoint
2018-11-30 01:19:58 -08:00
k8s-ci-robot a93fe6e9ef
Merge pull request #71357 from rosti/forgotten-println
kubeadm: Remove forgotten debug Println
2018-11-30 00:04:27 -08:00
k8s-ci-robot d9581ca041
Merge pull request #71340 from yuexiao-wang/fix-test
fix test names for manifests
2018-11-30 00:04:18 -08:00
k8s-ci-robot 409bfc4337
Merge pull request #71047 from pivotal-k8s/bump-k8s-utils
Bump k8s.io/uitls to 8e7ff06
2018-11-29 11:17:08 -08:00
k8s-ci-robot 791758b1ef
Merge pull request #71038 from neolit123/remove-dyn-kubelet-const
kubeadm: remove leftover DynamicKubeletConfig constant
2018-11-29 11:16:58 -08:00
k8s-ci-robot a2353d5bdb
Merge pull request #67360 from jiaxuanzhou/1.11
simplify logic for func BuildArgumentListFromMap
2018-11-29 02:01:03 -08:00
André Martins 5c1260b934 apis/kubeadm/v1beta1: fix typo in localApiEndpoint -> localAPIEndpoint
As localApiEndpoint is ignored by json.Unmarshaller this should be
localAPIEndpoint as defined in the json tag of the source code.

Signed-off-by: André Martins <aanm90@gmail.com>
2018-11-27 17:48:44 +01:00
k8s-ci-robot bb6101dfbb
Merge pull request #71385 from neolit123/kubeadm-fix-mark-control-plane-config
kubeadm: add missing --config flag to mark-control-plane phase
2018-11-24 09:29:49 -08:00
k8s-ci-robot 7098f1ad38
Merge pull request #71382 from yagonobre/fix-reset
Fix kubeadm reset in case of external etcd
2018-11-24 01:59:58 -08:00
Lubomir I. Ivanov a1a7ecaab3 kubeadm: add missing --config flag to mark-control-plane phase 2018-11-24 05:18:03 +02:00
Yago Nobre 52835fbc80
Fix kubeadm reset in case of external etcd 2018-11-23 16:27:00 -02:00
fabriziopandini 8a53031b4e Fix etcd connect for join --control-plane 2018-11-22 17:17:27 +01:00
Rostislav M. Georgiev 0110b6e8bf kubeadm: Remove forgotten debug Println
Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2018-11-22 17:05:23 +02:00
k8s-ci-robot b6a0718858
Merge pull request #71323 from bart0sh/PR0043-kubeadm-init-use-commandline-options-with-config
kubeadm: override node registration options from command line (follow-up)
2018-11-22 01:46:51 -08:00
yuexiao-wang 1d38de3a29 fix test names for manifests
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2018-11-22 15:30:24 +08:00
Ed Bartosh b4b4718fc1 kubeadm: override node registration options from command line
'kubeadm init' silently ignores --node-name and --cri-socket
command line options if --config option is specified.

Implemented setting 'name' and 'criSocket' options from the command
line even if --config command line option is used.
2018-11-21 21:39:07 +02:00
Rostislav M. Georgiev 037fb6103e kubeadm: config migrate handles more valid configs
kubeadm config migrate uses AnyConfigFileAndDefaultsToInternal, which can
unmarshal config from file only if InitConfiguration or JoinConfiguration are
present. Even with that in mind, it can only return a singlie config object,
with InitConfiguration taking precendence over JoinConfiguration. Thus, the
following cases were not handled properly, while they were perfectly valid for
kubeadm init/join:

- ClusterConfiguration only file caused kubeadm config migrate to exit with
  error.
- Init + Join configurations in the same file caused Init + Cluster
  configuration to be produced (ignoring JoinConfiguration). The same is valid
  when the combo is Init + Cluster + Join configurations.
- Cluster + Join configuration ignores ClusterConfiguration and only
  JoinConfiguration gets migrated.

To fix this, the following is done:
- Introduce MigrateOldConfigFromFile which migrates old config from a file,
  while ensuring that all kubeadm originated input config kinds are taken care
  of. Add comprehensive unit tests for this.
- Replace the use of AnyConfigFileAndDefaultsToInternal in
  kubeadm config migrate with MigrateOldConfigFromFile.
- Remove the no longer used and error prone AnyConfigFileAndDefaultsToInternal.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2018-11-21 13:18:39 +02:00
k8s-ci-robot 1431aeb45d
Merge pull request #71283 from Klaven/kubeadm_857
Updates to always pass spec.nodeName as --hostname-override
2018-11-20 17:31:24 -08:00
k8s-ci-robot aac9ee1793
Merge pull request #71259 from rosti/minver-bump-12
kubeadm: Bump minimum Kubernetes version to v1.12
2018-11-20 17:31:15 -08:00
k8s-ci-robot f8983a8988
Merge pull request #70633 from leblancd/kubeadm_etcd_v6_fix
Fix kubeadm etcd manifests to use brackets around IPv6 addrs
2018-11-20 15:34:24 -08:00
Marek Counts 5ad7e4ee09 Fixes kubeadm 857
updated manifest file to always pass spec.nodeName as the --hostname-override.
2018-11-20 17:44:26 -05:00
Ed Bartosh 012e46320b kubeadm: override node registration options from command line
'kubeadm join' silently ignores --node-name and --cri-socket
command line options if --config option is specified.

In some cases it's much easier for users to override these parameters
from the command line instead of updating config, especially for
multi-node automatic deployments where only node name should be changed.

Implemented setting 'name' and 'criSocket' options from the command
line even if --config command line option is used.
2018-11-20 16:26:57 +02:00
Rostislav M. Georgiev aa414e139e kubeadm: Bump minimum Kubernetes version to v1.12
Bump MinimumControlPlaneVersion and MinimumKubeletVersion to v1.12 and update
any related tests.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2018-11-20 16:21:49 +02:00
Ed Bartosh bab556f7a6 kubeadm: improve hostport parsing error messages
Added hostport and host/port parts to the error messages
produced by ParseHostPort API.

This should help users to better identify parsing issues.

Fixes: kubernetes/kubeadm#1159
2018-11-20 13:21:36 +02:00
k8s-ci-robot 50e02fd0cc
Merge pull request #71229 from chuckha/etcd-server
kubeadm: adds etcd server version for 1.13
2018-11-19 16:25:42 -08:00
k8s-ci-robot 956dcdd4ca
Merge pull request #71232 from liztio/sparse-cert-creation
Sparse cert creation for `kubeadm init`
2018-11-19 15:07:32 -08:00
liz 2f14e1801e
`kubeadm init` supports sparse certificates 2018-11-19 16:55:16 -05:00
k8s-ci-robot 16d6daf520
Merge pull request #71219 from neolit123/kubeadm-go-docs-1.13
kubeadm: fix issues in the v1beta1 godoc
2018-11-19 13:03:25 -08:00
liz 9e8228f14a
Move some test functions into test utils 2018-11-19 14:38:10 -05:00
Chuck Ha 679d4397cf
kubeadm: adds etcd server version for 1.13
Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
2018-11-19 14:34:00 -05:00
Yago Nobre c185836e64
Add flags to kubeadm init phase uploadconfig all 2018-11-19 14:02:29 -02:00
Lubomir I. Ivanov bc6837ffe3 kubeadm: fix issues in the v1beta1 godoc
- make the whole config example actually pass strict verification
(i.e. make the config work with --config)
- add print init-defaults/join defaults
- other small fixes
2018-11-19 17:26:34 +02:00
liz 440a5ad7cb
Don't allow --csr-only for CA certs or all 2018-11-16 15:22:37 -08:00
k8s-ci-robot f4fd7b0b2b
Merge pull request #71069 from fabriziopandini/kubeadm-phases-add-all-subcommands
Kubeadm - add all subcommands to phases
2018-11-16 15:17:03 -08:00
k8s-ci-robot fab7009997
Merge pull request #71135 from luxas/kubeadm_repo_flag
kubeadm: Allow customizing the image repository via flags
2018-11-16 13:20:16 -08:00
Dane LeBlanc 99887716c5 Fix kubeadm etcd manifests to use brackets around IPv6 addrs
When 'kubeadm init ...' is used with an IPv6 kubeadm configuration,
kubeadm currently generates an etcd.yaml manifest that uses IP:port
combinatins where the IP is an IPv6 address, but it is not enclosed
in square brackets, e.g.:
    - --advertise-client-urls=https://fd00:20::2:2379
For IPv6 advertise addresses, this should be of the form:
    - --advertise-client-urls=https://[fd00:20::2]:2379

The lack of brackets around IPv6 addresses in cases like this is
causing failures to bring up IPv6-only clusters with Kubeadm as
described in kubernetes/kubeadm Issues #1212.

This format error is fixed by using net.JoinHostPort() to generate
URLs as shown above.

Fixes kubernetes/kubeadm Issue #1212
2018-11-16 15:12:29 -05:00
k8s-ci-robot 7ff49c99d3
Merge pull request #71126 from rosti/warn-api-bind-override
kubeadm: Warn on API server bind address override
2018-11-16 12:04:10 -08:00